oh-my-opencode 5.0.0-beta.17 → 5.0.0-beta.19

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 (156) hide show
  1. package/dist/cli/index.js +641 -161
  2. package/dist/cli/runtime-commands.d.ts +1 -1
  3. package/dist/cli/worktree-sweep/classify.d.ts +16 -0
  4. package/dist/cli/worktree-sweep/format.d.ts +8 -0
  5. package/dist/cli/worktree-sweep/git.d.ts +19 -0
  6. package/dist/cli/worktree-sweep/index.d.ts +7 -0
  7. package/dist/cli/worktree-sweep/options.d.ts +2 -0
  8. package/dist/cli/worktree-sweep/parse-worktree-list.d.ts +8 -0
  9. package/dist/cli/worktree-sweep/sweep.d.ts +2 -0
  10. package/dist/cli/worktree-sweep/types.d.ts +65 -0
  11. package/dist/cli/worktree-sweep/worktree-sweep.d.ts +2 -0
  12. package/dist/cli-node/index.js +641 -161
  13. package/dist/index.js +324 -176
  14. package/dist/skills/ast-grep/AGENTS.md +51 -0
  15. package/dist/skills/coding-agent-sessions/AGENTS.md +62 -0
  16. package/dist/skills/review-work/SKILL.md +3 -3
  17. package/dist/skills/start-work/SKILL.md +2 -1
  18. package/dist/skills/ultimate-browsing/SKILL.md +2 -0
  19. package/dist/skills/ultimate-browsing/references/chrome-stealth.md +2 -0
  20. package/dist/skills/visual-qa/AGENTS.md +58 -0
  21. package/dist/tui.js +17 -17
  22. package/package.json +21 -21
  23. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  24. package/packages/omo-codex/plugin/AGENTS.md +47 -0
  25. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  26. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  27. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  28. package/packages/omo-codex/plugin/components/comment-checker/AGENTS.md +9 -0
  29. package/packages/omo-codex/plugin/components/comment-checker/biome.json +2 -2
  30. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  31. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  32. package/packages/omo-codex/plugin/components/comment-checker/src/apply-patch.ts +2 -8
  33. package/packages/omo-codex/plugin/components/comment-checker/src/core.ts +1 -2
  34. package/packages/omo-codex/plugin/components/comment-checker/src/request-extractor.ts +1 -1
  35. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  36. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  37. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/biome.json +2 -2
  38. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +1 -5
  39. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +1 -5
  40. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  41. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  42. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +1 -5
  43. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +1 -4
  44. package/packages/omo-codex/plugin/components/lsp/AGENTS.md +30 -15
  45. package/packages/omo-codex/plugin/components/lsp/biome.json +2 -2
  46. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  47. package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.js +1 -1
  48. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  49. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  50. package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +1 -1
  51. package/packages/omo-codex/plugin/components/lsp/src/daemon-cli-path.ts +1 -5
  52. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +6 -7
  53. package/packages/omo-codex/plugin/components/lsp/test/codex-hook.test.ts +1 -2
  54. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +11 -1
  55. package/packages/omo-codex/plugin/components/rules/AGENTS.md +12 -0
  56. package/packages/omo-codex/plugin/components/rules/biome.json +2 -2
  57. package/packages/omo-codex/plugin/components/rules/dist/cli.js +43 -30
  58. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  59. package/packages/omo-codex/plugin/components/rules/package.json +2 -2
  60. package/packages/omo-codex/plugin/components/rules/src/config.ts +1 -2
  61. package/packages/omo-codex/plugin/components/rules/src/persistent-cache.ts +1 -2
  62. package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +6 -2
  63. package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +1 -4
  64. package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +4 -9
  65. package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +1 -2
  66. package/packages/omo-codex/plugin/components/rules/test/dynamic-target-fingerprints.test.ts +1 -2
  67. package/packages/omo-codex/plugin/components/rules/test/engine.test.ts +7 -4
  68. package/packages/omo-codex/plugin/components/rules/test/finder.test.ts +2 -3
  69. package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +2 -3
  70. package/packages/omo-codex/plugin/components/rules/test/hephaestus-model-variant.test.ts +1 -2
  71. package/packages/omo-codex/plugin/components/rules/test/matcher.test.ts +2 -3
  72. package/packages/omo-codex/plugin/components/rules/test/package-smoke.test.ts +1 -1
  73. package/packages/omo-codex/plugin/components/rules/test/parser.test.ts +1 -2
  74. package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +1 -2
  75. package/packages/omo-codex/plugin/components/rules/test/rules-engine-consumption.test.ts +3 -6
  76. package/packages/omo-codex/plugin/components/rules/test/scanner.test.ts +1 -2
  77. package/packages/omo-codex/plugin/components/rules/test/sources.test.ts +2 -5
  78. package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -2
  79. package/packages/omo-codex/plugin/components/start-work-continuation/biome.json +2 -2
  80. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  81. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  82. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  83. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  84. package/packages/omo-codex/plugin/components/telemetry/AGENTS.md +8 -0
  85. package/packages/omo-codex/plugin/components/telemetry/biome.json +2 -2
  86. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +237 -99
  87. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +237 -99
  88. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  89. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  90. package/packages/omo-codex/plugin/components/telemetry/src/codex-hook.ts +1 -4
  91. package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +4 -14
  92. package/packages/omo-codex/plugin/components/telemetry/src/product-identity.ts +1 -1
  93. package/packages/omo-codex/plugin/components/telemetry/test/diagnostics.test.ts +2 -5
  94. package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -0
  95. package/packages/omo-codex/plugin/components/ultrawork/biome.json +2 -2
  96. package/packages/omo-codex/plugin/components/ultrawork/directive.md +7 -1
  97. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  98. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  99. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +7 -1
  100. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +9 -1
  101. package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +16 -0
  102. package/packages/omo-codex/plugin/components/ulw-loop/biome.json +2 -2
  103. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +7 -1
  104. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +1 -1
  105. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +1 -1
  106. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  107. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  108. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-snapshot.ts +3 -1
  109. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +3 -1
  110. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-snapshot.test.ts +18 -0
  111. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +3 -2
  112. package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +8 -5
  113. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  114. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  115. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  116. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  117. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  118. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  119. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  120. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  121. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  122. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  123. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  124. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  125. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  126. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  127. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  128. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  129. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  130. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  131. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  132. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  133. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  134. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  135. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  136. package/packages/omo-codex/plugin/package-lock.json +19 -19
  137. package/packages/omo-codex/plugin/package.json +1 -1
  138. package/packages/omo-codex/plugin/scripts/AGENTS.md +40 -0
  139. package/packages/omo-codex/plugin/skills/ast-grep/AGENTS.md +51 -0
  140. package/packages/omo-codex/plugin/skills/coding-agent-sessions/AGENTS.md +62 -0
  141. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +3 -3
  142. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +2 -1
  143. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +2 -0
  144. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +2 -0
  145. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +7 -1
  146. package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +58 -0
  147. package/packages/omo-codex/plugin/test/AGENTS.md +47 -0
  148. package/packages/omo-codex/scripts/AGENTS.md +36 -0
  149. package/packages/omo-codex/scripts/install-dist/install-local.mjs +249 -120
  150. package/packages/shared-skills/skills/ast-grep/AGENTS.md +51 -0
  151. package/packages/shared-skills/skills/coding-agent-sessions/AGENTS.md +62 -0
  152. package/packages/shared-skills/skills/review-work/SKILL.md +3 -3
  153. package/packages/shared-skills/skills/start-work/SKILL.md +2 -1
  154. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +2 -0
  155. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +2 -0
  156. package/packages/shared-skills/skills/visual-qa/AGENTS.md +58 -0
@@ -0,0 +1,51 @@
1
+ # ast-grep — Vendored Structural-Search Skill
2
+
3
+ **Generated:** 2026-08-24 (f3642fcda)
4
+
5
+ ## OVERVIEW
6
+
7
+ Vendored skill teaching agents ast-grep (`sg`) structural search/rewrite, plus a stdlib-Python helper CLI that wraps the `sg` binary. Vendoring pin in `SOURCE`: upstream `code-yeongyu/ast-grep-skill @ 3148c69` (ast-grep 0.45.0), "vendored as a sync; do not fork-drift". Earned this file: own executable surface (749-LOC helper + installers + smoke tests) and a no-fork-drift upstream contract that has no analogue elsewhere in `shared-skills`.
8
+
9
+ ## STRUCTURE
10
+
11
+ ```
12
+ ast-grep/
13
+ ├── SKILL.md / README.md # agent workflow / user overview
14
+ ├── SOURCE # upstream pin — the no-fork-drift contract
15
+ ├── scripts/ast_grep_helper.py # 749-LOC stdlib CLI (argparse; no deps)
16
+ ├── install.sh / install.ps1 # macOS/Linux + Windows installers
17
+ ├── references/ # cli, install, patterns, pitfalls, recipes, yaml-rules (510 LOC), sgconfig
18
+ └── tests/smoke.{sh,ps1} # POSIX + PowerShell smoke (also shell syntax + content checks)
19
+ ```
20
+
21
+ ## HELPER CLI (`scripts/ast_grep_helper.py`)
22
+
23
+ Subcommands: `search`, `replace` (dry-run; `--apply` to write), `scan`, `test`, `new`, `langs`, `doctor`, `install`, `validate`. Resolves the `sg`/`ast-grep` binary across PATH, Homebrew, npm, and OMO caches, validates patterns before executing, and shells out — it never links ast-grep as a library. Internal handlers `cmd_*`; utilities `validate_pattern`, `normalize_lang`, `resolve_binary`, `run_sg`. Nothing in-repo imports it; docs and skills invoke it by path. `omo-opencode/src/cli/install-ast-grep-sg.ts` locates this skill dir to install the binary.
24
+
25
+ ## CONVENTIONS
26
+
27
+ - AST patterns, never regex, for syntax-shaped queries; `$VAR` singles, `$$$` multis; patterns must parse as complete code in the target language.
28
+ - Two-pass rewrites: preview with `--json=compact`, apply separately with `--update-all` — the flags are mutually exclusive in `sg`.
29
+ - `sgconfig.yml` discovered upward; `ruleDirs`, optional `testConfigs`/`utilDirs`, language globs, custom languages, injections.
30
+ - Upstream syncs land as whole vendored refreshes matching `SOURCE`; local edits ride along until the next sync absorbs or reverts them.
31
+
32
+ ## ANTI-PATTERNS
33
+
34
+ - NO regex constructs (`.*`, `.+`, `\w`, `\d`, literal `|`) inside AST patterns — that is the skill's #1 pitfall.
35
+ - No incomplete patterns (e.g. Python `def $F($$$):` without a body).
36
+ - NEVER `--apply` a rewrite without the dry-run preview first.
37
+ - Text/comment/byte queries go to `rg`, not structural matching.
38
+ - Do not fork-drift from the `SOURCE` pin; a sync is a vendored refresh, not a merge.
39
+
40
+ ## COMMANDS
41
+
42
+ ```bash
43
+ # from packages/shared-skills/skills/ast-grep/
44
+ python3 scripts/ast_grep_helper.py search '<PATTERN>' --lang ts [path]
45
+ python3 scripts/ast_grep_helper.py replace '<PATTERN>' '<REWRITE>' --lang ts # dry-run; add --apply
46
+ python3 scripts/ast_grep_helper.py doctor
47
+ bash tests/smoke.sh # or: pwsh tests/smoke.ps1
48
+ # direct: sg run -p '<PATTERN>' --lang ts path
49
+ ```
50
+
51
+ - Parent: [`packages/shared-skills/AGENTS.md`](../../AGENTS.md).
@@ -0,0 +1,62 @@
1
+ # coding-agent-sessions — Cross-Platform Session Finder (Python)
2
+
3
+ **Generated:** 2026-08-24 (f3642fcda)
4
+
5
+ ## OVERVIEW
6
+
7
+ The only shared skill besides `ultimate-browsing` carrying a real sub-project: a Python package + CLI that finds, lists, searches, and reads local coding-agent session transcripts across ~25 platforms (Codex, Claude, OpenCode, OMO/Senpi/pi, and a long tail), normalizing them into one `Session` model. Earned this file: 33 files, 23 Python modules, own test suite, own `pyrightconfig.json`, own `.npmignore` (ships in the npm package minus tests/caches).
8
+
9
+ ## STRUCTURE
10
+
11
+ ```
12
+ coding-agent-sessions/
13
+ ├── SKILL.md # router: platform table → references/<platform>.md
14
+ ├── references/ # codex, claude, opencode, senpi, all-platforms (store layouts per platform)
15
+ ├── agents/openai.yaml # Codex agent role declaration
16
+ ├── scripts/
17
+ │ ├── find-agent-sessions.py # thin shebang entry (PEP 723, >=3.11); runpy → agent_sessions.cli
18
+ │ ├── agent_sessions/ # the package (12 modules)
19
+ │ └── tests/ # 6 pytest modules
20
+ └── pyrightconfig.json # extraPaths scripts/, excludes scripts/tests
21
+ ```
22
+
23
+ ## PUBLIC API (`scripts/agent_sessions/`)
24
+
25
+ | Module | Key exports |
26
+ |--------|-------------|
27
+ | `scanners.py` | `scan`, `DEFAULT_PLATFORMS`, `PLATFORM_SCANNERS`, per-platform `scan_*` (codex, claude, opencode, senpi, oh_my_pi, gajae_code, …) |
28
+ | `types.py` | `Session`, `Options`, `Json`, `JsonMap` — imported by nearly every module and test |
29
+ | `transcript.py` | parallel file reads, normalization, timestamps, session ids; `recent`, `MAX_PLATFORM_FILES` |
30
+ | `cli.py` | command parsing, filtering, payload construction, JSON emission (283 LOC — behavioral hotspot) |
31
+ | platform adapters | `file_scanners.py` (file-backed providers), `opencode.py` (CLI/SQLite/storage fallbacks), `sqlite_scanners.py`, `sqlite_optional_scanners.py`, `pi_family.py`, `aside_scanner.py`, `kiro_scanner.py` |
32
+
33
+ ## CLI CONTRACT
34
+
35
+ `python3 scripts/find-agent-sessions.py <command>`; aliases `find`=`search`, `read`=`get`. Commands: `list`, `find`/`search` (repeated `--query` lanes, `--from 7d`, repeated `--platform`, `--workers`, `--cwd/--model`, `--include-subagents`, `--limit`), `get`/`read <session-id>`. Output is JSON with `match_reasons` and reconstructed first/last user prompts — that JSON shape is the stable contract.
36
+
37
+ ## CONVENTIONS
38
+
39
+ - Stdlib-only Python (`>=3.11`), `from __future__ import annotations`, pathlib everywhere; no third-party deps at runtime.
40
+ - Probe-first, bounded discovery: platform-specific roots checked before broad globbing; optional platforms excluded from default search when they cannot reconstruct user prompts.
41
+ - Main sessions hide subagent children by default but report child counts; `--include-subagents` flips it. Parent/child linkage preserved and records deduplicated.
42
+ - Tests are pytest with `tmp_path` + `MonkeyPatch` isolation; in-file `# pyright: ignore[reportMissingImports]`-style relaxations for import diagnostics only.
43
+ - `.npmignore` strips `scripts/tests/`, `pyrightconfig.json`, and caches from the shipped skill.
44
+
45
+ ## ANTI-PATTERNS
46
+
47
+ - NEVER answer from normalized previews alone — pull the raw transcript (`read`/`get`) for exact evidence.
48
+ - Usage-only stores are NOT transcript sources.
49
+ - A Claude subagent's embedded `sessionId` is NOT its identity — use its `agentId` + parent-directory linkage.
50
+ - Don't add a platform by globbing blindly; register it in `PLATFORM_SCANNERS`/`DEFAULT_PLATFORMS` with a bounded root probe.
51
+
52
+ ## COMMANDS
53
+
54
+ ```bash
55
+ # from packages/shared-skills/skills/coding-agent-sessions/
56
+ python3 scripts/find-agent-sessions.py list --limit 20
57
+ python3 scripts/find-agent-sessions.py find "commit" --from 7d --platform senpi --platform opencode
58
+ python3 scripts/find-agent-sessions.py read <session-id>
59
+ pytest scripts/tests
60
+ ```
61
+
62
+ - Parent: [`packages/shared-skills/AGENTS.md`](../../AGENTS.md).
@@ -90,7 +90,7 @@ Before launching agents, collect these inputs. Extract from conversation history
90
90
  </required_inputs>
91
91
 
92
92
 
93
- Review PRs and branches from a dedicated review worktree only: create or attach one with `git worktree add <path> <branch>` before collecting changed files, diff, file contents, or running checks. The main worktree is read-only context; never checkout, test, or edit the review branch there.
93
+ Review PRs and branches from a dedicated review worktree only: create or attach one with `git worktree add <path> <branch>` before collecting changed files, diff, file contents, or running checks, then immediately lock it with `git worktree lock <path> --reason "review:<pr-or-branch>"`. The main worktree is read-only context; never checkout, test, or edit the review branch there.
94
94
 
95
95
  **Auto-collection sequence:**
96
96
 
@@ -530,8 +530,6 @@ OUTPUT FORMAT:
530
530
  """)
531
531
  ```
532
532
 
533
- ---
534
-
535
533
  ## Phase 2: Wait & Collect
536
534
 
537
535
  After launching all 5 agents in one turn, wait for completions in bounded
@@ -561,6 +559,8 @@ review result with the incomplete lane named. Do not spin in repeated
561
559
  wait/followup cycles. Do not use `multi_agent_v1.send_input` as an interrupt; queued
562
560
  followups are not cancellation.
563
561
 
562
+ After ALL 5 lanes reach a terminal state and before delivering the verdict, tear down the review worktree: run `git worktree unlock <path>` followed by `git worktree remove <path>`. The lanes above run inside that worktree, so removing it earlier destroys their working directory; a crashed review leaves the locked tree as a recoverable marker for manual cleanup.
563
+
564
564
  ---
565
565
 
566
566
  ## Phase 3: Deliver Verdict
@@ -102,6 +102,7 @@ For PR/branch work, a task-owned worktree is mandatory before implementation sta
102
102
  Solo orchestration with parallel background workers is the default topology. Decide once, when the wave's lanes are known, and record the verdict in the ledger:
103
103
 
104
104
  - **Independent lanes -> parallel workers.** Separate files, no shared contract: one parallel spawn burst; no team.
105
+ - **Dependency-ordered lanes -> a dag run.** Sub-tasks with real ordering between them (C needs A and B finished first) and a harness with a native `dag` tool: dispatch the wave as ONE dag run — one producer node per lane plus a verification node — instead of a spawn burst, and watch the run's lifecycle instead of arming per-lane watchers. Read the `mass-ulw` skill's `SKILL.md` and `references/planning.md` IN FULL before defining any graph.
105
106
  - **Overlapping lanes -> a team.** The lanes touch the same module or contract AND running them concurrently actually finishes sooner: stand up a team (where the harness has one) so one lane's discoveries relay through you mid-flight.
106
107
  - **PR-mode independent lanes -> a worktree per lane.** Under `--make-pr`/`--ship`, when a wave holds independent checkboxes, give each lane its own branch and task-owned worktree, delivered as its own PR.
107
108
 
@@ -118,7 +119,7 @@ Landing rules, regardless of topology:
118
119
  3. Ignore nested checkboxes under acceptance criteria, evidence, and definition-of-done sections.
119
120
  4. Classify the checkbox tier and record it in its ledger entry. Default is LIGHT — a narrow change inside existing layers. Take HEAVY only on a fact you can point to: a new module / abstraction / domain model; auth, security, or session; an external integration; a DB schema or migration; concurrency or transaction boundaries; a cross-domain refactor; or the plan or user signals care. When unsure, take HEAVY; upgrade and redo skipped gates the moment a HEAVY fact surfaces; never downgrade.
120
121
  5. Decompose that checkbox into atomic sub-tasks sized for ONE worker in ONE run — a sub-task that would need mid-flight steering is two sub-tasks. Collect every other unchecked checkbox in the same plan wave whose dependencies are met — their lanes execute concurrently. A wave that could split further but holds fewer than 3 independent sub-tasks is under-split.
121
- 6. **DELEGATE EVERYTHING. YOU NEVER IMPLEMENT.** Route every sub-task through the delegation router below, then dispatch ALL independent sub-tasks across those checkboxes in one parallel worker-spawn burst (a single batched spawn call where the harness supports it); serialize only named dependencies. Verification and checkbox marking stay per-checkbox.
122
+ 6. **DELEGATE EVERYTHING. YOU NEVER IMPLEMENT.** Route every sub-task through the delegation router below, then dispatch ALL independent sub-tasks across those checkboxes in one parallel worker-spawn burst (a single batched spawn call where the harness supports it); route named dependencies per the lane-topology decision above. Verification and checkbox marking stay per-checkbox.
122
123
  7. Give every dispatched sub-task its completion condition and watch for it per the section below. A dispatch whose completion nobody watches is an unfinished dispatch.
123
124
 
124
125
  ### Monitor every dispatched subagent to its completion condition
@@ -86,6 +86,8 @@ Routing table, per-platform auth (set `TWITTER_*` env vars, `gh auth login`, a t
86
86
 
87
87
  CloakBrowser is a stealth Chromium with source-level fingerprint patches that passes Cloudflare Turnstile, FingerprintJS, BrowserScan, and 30+ detectors; agent-browser is the CDP automation CLI that drives it. Both are runtime-installed tools (not vendored here). Full setup, version pins, launch flow, cookie login, and cross-platform notes are in [references/chrome-stealth.md](references/chrome-stealth.md).
88
88
 
89
+ NEVER clear cookies, cache, or site data (`Network.clearBrowserCookies`, `Storage.clearCookies`, `chrome.browsingData.remove`, "clear browsing data") on the user's real/main browser profile — it wipes their logged-in state everywhere. If the task needs that profile's login state, clone the profile directory first (`rsync -a <profile>/ <tmp-clone>/`) and launch CloakBrowser / agent-browser with the clone as the user-data-dir; run any clearing on the clone only.
90
+
89
91
  ```bash
90
92
  # 1. Launch CloakBrowser with CDP on :9242 (see chrome-stealth.md for install + venv).
91
93
  # 2. CloakBrowser launches tabless — open the first tab via CDP before any agent-browser command:
@@ -38,6 +38,8 @@ python -c "import cloakbrowser; print(cloakbrowser.__version__, cloakbrowser.CHR
38
38
 
39
39
  ## Launch + drive
40
40
 
41
+ NEVER clear cookies, cache, or site data (`Network.clearBrowserCookies`, `Storage.clearCookies`, `chrome.browsingData.remove`, "clear browsing data") on the user's real/main browser profile — it wipes their logged-in state everywhere. If you need that profile's login state, clone it first (`rsync -a <profile>/ <tmp-clone>/`) and launch with the clone as the user-data-dir; run any clearing on the clone only.
42
+
41
43
  ```bash
42
44
  # 1. Launch CloakBrowser with CDP on :9242 (background). With the venv active:
43
45
  python -c "import asyncio,cloakbrowser; asyncio.run(cloakbrowser.launch_async(headless=False, stealth_args=True, args=['--remote-debugging-port=9242']))" &
@@ -0,0 +1,58 @@
1
+ # visual-qa — Bundled Visual-Evidence CLI
2
+
3
+ **Generated:** 2026-08-24 (f3642fcda)
4
+
5
+ ## OVERVIEW
6
+
7
+ The visual-QA skill's executable core: a zero-dependency Node CLI that produces machine evidence (`image-diff`, `tui-check`) plus the TypeScript sources it is bundled from. Earned this file: the only shared skill shipping a built bundle whose runtime and development sources must be kept in lockstep.
8
+
9
+ ## STRUCTURE
10
+
11
+ ```
12
+ visual-qa/
13
+ ├── SKILL.md # reviewer workflow (dual oracle, evidence gates) — the prose contract
14
+ ├── references/agent-browser-setup.md
15
+ └── scripts/
16
+ ├── visual-qa.mjs # SHIPPED RUNTIME: bun-build bundle of cli.ts (+ embedded modules)
17
+ ├── cli.ts # development source; dispatches image-diff / tui-check
18
+ ├── image-diff.ts # diffImages — 8x8 grid cells, hotspots, rounded metrics
19
+ ├── tui-grid.ts # checkTui — column overflow + border alignment verdicts
20
+ ├── east-asian-width.ts # charWidth / stringWidth — CJK-aware width math
21
+ ├── ansi.ts # ANSI escape stripping (width must be escape-aware)
22
+ ├── png-decode.ts / png-crc.ts / png-synth.ts # stdlib PNG codec (no deps)
23
+ ├── types.ts
24
+ └── *.test.ts # co-located bun tests for every module above
25
+ ```
26
+
27
+ ## BUNDLE/SOURCE DUALITY
28
+
29
+ `visual-qa.mjs` is the artifact the skill's commands invoke (`node "$SKILL_DIR/scripts/visual-qa.mjs" …`); the `.ts` files exist for development and tests only. A behavior fix lands in the TS source AND the bundle is regenerated from `cli.ts` — editing one without the other makes tests and runtime disagree. Never hand-edit the `.mjs`.
30
+
31
+ ## SURFACE
32
+
33
+ - Commands: `image-diff <reference.png> <actual.png>` and `tui-check <capture.txt> --cols <N>`; JSON verdict output (hotspot cells, overflow lines, wide-char columns, border alignment).
34
+ - Module exports: `diffImages`, `checkTui`, `charWidth`/`stringWidth`, ANSI + PNG helpers. `cli.ts` owns `CliError`, `parseColumns`, `run`, `main`.
35
+
36
+ ## CONVENTIONS
37
+
38
+ - Zero runtime dependencies — PNG decode/synthesis and ANSI handling are hand-rolled in `scripts/`; keep it that way (the bundle must stay require-free apart from `node:` builtins).
39
+ - Width is never `String.length`: CJK wide characters and ANSI escapes are accounted for before any column math.
40
+ - Tests are co-located `bun test scripts/*.test.ts`, given/when/then style per repo convention.
41
+
42
+ ## ANTI-PATTERNS
43
+
44
+ - NEVER hand-edit `visual-qa.mjs`; regenerate from source.
45
+ - Don't add an npm dependency to make PNG/diff easier — the no-dep bundle is the point.
46
+ - Column math that ignores CJK width or ANSI escapes is wrong by construction; `tui-check` exists because text-diff tools get terminal grids wrong.
47
+ - Skill-level rule worth repeating for code changes: `tmux capture-pane` is forbidden as a capture mechanism.
48
+
49
+ ## COMMANDS
50
+
51
+ ```bash
52
+ # from packages/shared-skills/skills/visual-qa/
53
+ node scripts/visual-qa.mjs image-diff <reference.png> <actual.png>
54
+ node scripts/visual-qa.mjs tui-check <capture.txt> --cols 80
55
+ bun test scripts/*.test.ts
56
+ ```
57
+
58
+ - Parent: [`packages/shared-skills/AGENTS.md`](../../AGENTS.md).