oh-my-opencode 4.19.3 → 4.19.4
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/.agents/command/get-unpublished-changes.md +2 -0
- package/.agents/command/omomomo.md +1 -1
- package/.agents/command/publish.md +7 -0
- package/.agents/skills/get-unpublished-changes/SKILL.md +2 -0
- package/.agents/skills/hyperplan/SKILL.md +3 -3
- package/.agents/skills/omomomo/SKILL.md +1 -1
- package/.agents/skills/publish/SKILL.md +7 -0
- package/.opencode/command/get-unpublished-changes.md +2 -0
- package/.opencode/command/omomomo.md +1 -1
- package/.opencode/command/publish.md +7 -0
- package/.opencode/skills/hyperplan/SKILL.md +3 -3
- package/dist/agents/sisyphus-junior/agent.d.ts +1 -1
- package/dist/cli/doctor/checks/deprecated-reasoning-keys.d.ts +2 -0
- package/dist/cli/index.js +1625 -1368
- package/dist/cli-node/index.js +1625 -1368
- package/dist/config/schema/agent-overrides.d.ts +800 -0
- package/dist/config/schema/categories.d.ts +132 -0
- package/dist/config/schema/fallback-models.d.ts +50 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +818 -2
- package/dist/config-migration/index.d.ts +1 -0
- package/dist/config-migration/migration-plans.d.ts +1 -0
- package/dist/config-migration/reasoning-unification.d.ts +3 -0
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +2 -0
- package/dist/hooks/codegraph-bootstrap/command-runner.d.ts +1 -0
- package/dist/hooks/model-fallback/next-fallback.d.ts +1 -0
- package/dist/hooks/runtime-fallback/constants.d.ts +1 -1
- package/dist/index.js +3558 -3241
- package/dist/oh-my-opencode.schema.json +1672 -8
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -0
- package/dist/shared/agent-variant.d.ts +11 -0
- package/dist/shared/session-prompt-params-helpers.d.ts +6 -1
- package/dist/skills/coding-agent-sessions/SKILL.md +4 -3
- package/dist/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +3 -0
- package/dist/skills/data-scientist/SKILL.md +243 -0
- package/dist/skills/data-scientist/references/common-scenarios.md +176 -0
- package/dist/skills/data-scientist/references/execution-templates.md +197 -0
- package/dist/skills/data-scientist/references/integration-patterns.md +153 -0
- package/dist/skills/data-scientist/references/performance-benchmarks.md +37 -0
- package/dist/skills/data-scientist/references/uv-setup.md +78 -0
- package/dist/skills/data-scientist/scripts/quick-query.py +111 -0
- package/dist/skills/data-scientist/scripts/setup-uv.ps1 +53 -0
- package/dist/skills/data-scientist/scripts/setup-uv.sh +60 -0
- package/dist/skills/debugging/SKILL.md +1 -1
- package/dist/skills/programming/SKILL.md +1 -2
- package/dist/skills/ulw-plan/SKILL.md +1 -1
- package/dist/skills/ulw-research/SKILL.md +122 -11
- package/dist/tools/delegate-task/builtin-categories.d.ts +1 -0
- package/dist/tools/delegate-task/builtin-category-definition.d.ts +1 -0
- package/dist/tools/delegate-task/constants.d.ts +1 -1
- package/dist/tui.js +974 -1090
- package/package.json +13 -13
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +2 -2
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +21 -3
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +279 -58
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +230 -41
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +6 -0
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +6 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +4 -3
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +3 -0
- package/packages/omo-codex/plugin/skills/data-scientist/SKILL.md +243 -0
- package/packages/omo-codex/plugin/skills/data-scientist/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/common-scenarios.md +176 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/execution-templates.md +197 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/integration-patterns.md +153 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/performance-benchmarks.md +37 -0
- package/packages/omo-codex/plugin/skills/data-scientist/references/uv-setup.md +78 -0
- package/packages/omo-codex/plugin/skills/data-scientist/scripts/quick-query.py +111 -0
- package/packages/omo-codex/plugin/skills/data-scientist/scripts/setup-uv.ps1 +53 -0
- package/packages/omo-codex/plugin/skills/data-scientist/scripts/setup-uv.sh +60 -0
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +1 -2
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +121 -11
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +7 -0
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +12 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +24 -5
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +4 -3
- package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +140 -0
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +3 -0
- package/packages/shared-skills/skills/data-scientist/SKILL.md +243 -0
- package/packages/shared-skills/skills/data-scientist/references/common-scenarios.md +176 -0
- package/packages/shared-skills/skills/data-scientist/references/execution-templates.md +197 -0
- package/packages/shared-skills/skills/data-scientist/references/integration-patterns.md +153 -0
- package/packages/shared-skills/skills/data-scientist/references/performance-benchmarks.md +37 -0
- package/packages/shared-skills/skills/data-scientist/references/uv-setup.md +78 -0
- package/packages/shared-skills/skills/data-scientist/scripts/quick-query.py +111 -0
- package/packages/shared-skills/skills/data-scientist/scripts/setup-uv.ps1 +53 -0
- package/packages/shared-skills/skills/data-scientist/scripts/setup-uv.sh +60 -0
- package/packages/shared-skills/skills/debugging/SKILL.md +1 -1
- package/packages/shared-skills/skills/programming/SKILL.md +1 -2
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-research/SKILL.md +122 -11
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#!/usr/bin/env -S uv run --script
|
|
2
|
+
# /// script
|
|
3
|
+
# requires-python = ">=3.11"
|
|
4
|
+
# dependencies = [
|
|
5
|
+
# "duckdb",
|
|
6
|
+
# "polars",
|
|
7
|
+
# "numpy",
|
|
8
|
+
# "pyarrow",
|
|
9
|
+
# "typer",
|
|
10
|
+
# "rich",
|
|
11
|
+
# ]
|
|
12
|
+
# ///
|
|
13
|
+
|
|
14
|
+
"""Quick data query runner. SQL arg -> DuckDB; --filter (Polars SQL) -> Polars; --describe -> schema + stats."""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
import typer
|
|
21
|
+
from rich import print as rprint
|
|
22
|
+
from rich.table import Table
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _run_duckdb(file_path: Path, sql: str) -> None:
|
|
26
|
+
import duckdb
|
|
27
|
+
|
|
28
|
+
table_ref = f"'{file_path}'"
|
|
29
|
+
stem = file_path.stem
|
|
30
|
+
query = sql
|
|
31
|
+
for alias in ("data", "df", stem):
|
|
32
|
+
query = query.replace(f"FROM {alias} ", f"FROM {table_ref} ")
|
|
33
|
+
query = query.replace(f"FROM {alias}\n", f"FROM {table_ref}\n")
|
|
34
|
+
query = query.replace(f"from {alias} ", f"from {table_ref} ")
|
|
35
|
+
query = query.replace(f"from {alias}\n", f"from {table_ref}\n")
|
|
36
|
+
if query.endswith(f"FROM {alias}") or query.endswith(f"from {alias}"):
|
|
37
|
+
query = query[: -len(alias)] + table_ref
|
|
38
|
+
|
|
39
|
+
result = duckdb.sql(query)
|
|
40
|
+
df = result.pl()
|
|
41
|
+
_print_polars(df)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _run_polars_filter(file_path: Path, expr: str) -> None:
|
|
45
|
+
import polars as pl
|
|
46
|
+
|
|
47
|
+
df = _read_file(file_path)
|
|
48
|
+
filtered = df.filter(pl.sql_expr(expr))
|
|
49
|
+
_print_polars(filtered)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _run_describe(file_path: Path) -> None:
|
|
53
|
+
df = _read_file(file_path)
|
|
54
|
+
|
|
55
|
+
rprint(f"\n[bold]Schema:[/bold] {file_path.name} ({len(df)} rows × {len(df.columns)} cols)")
|
|
56
|
+
for name, dtype in zip(df.columns, df.dtypes):
|
|
57
|
+
rprint(f" {name}: [cyan]{dtype}[/cyan]")
|
|
58
|
+
|
|
59
|
+
rprint("\n[bold]Statistics:[/bold]")
|
|
60
|
+
_print_polars(df.describe())
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _read_file(file_path: Path): # noqa: ANN202
|
|
64
|
+
import polars as pl
|
|
65
|
+
|
|
66
|
+
suffix = file_path.suffix.lower()
|
|
67
|
+
if suffix == ".csv":
|
|
68
|
+
return pl.read_csv(file_path)
|
|
69
|
+
if suffix == ".parquet":
|
|
70
|
+
return pl.read_parquet(file_path)
|
|
71
|
+
if suffix == ".json":
|
|
72
|
+
return pl.read_json(file_path)
|
|
73
|
+
if suffix in (".jsonl", ".ndjson"):
|
|
74
|
+
return pl.read_ndjson(file_path)
|
|
75
|
+
rprint(f"[red]Unsupported format:[/red] {suffix} (Excel: export to CSV or Parquet first)")
|
|
76
|
+
raise SystemExit(1)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def _print_polars(df) -> None: # noqa: ANN001
|
|
80
|
+
table = Table(show_lines=False)
|
|
81
|
+
for col_name in df.columns:
|
|
82
|
+
table.add_column(col_name)
|
|
83
|
+
for row in df.iter_rows():
|
|
84
|
+
table.add_row(*(str(v) for v in row))
|
|
85
|
+
rprint(table)
|
|
86
|
+
rprint(f"[dim]{df.shape[0]} rows × {df.shape[1]} cols[/dim]")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def main(
|
|
90
|
+
file: Path = typer.Argument(help="Data file (csv, parquet, json, ndjson)"),
|
|
91
|
+
sql: str = typer.Argument(None, help="SQL query (uses DuckDB). Use 'data' as table name."),
|
|
92
|
+
filter_expr: str = typer.Option(None, "--filter", "-f", help="Polars SQL filter, e.g. 'amount > 100'"),
|
|
93
|
+
describe: bool = typer.Option(False, "--describe", "-d", help="Print schema + stats"),
|
|
94
|
+
) -> None:
|
|
95
|
+
"""Query data files with DuckDB (SQL) or Polars (SQL filter expressions)."""
|
|
96
|
+
if not file.exists():
|
|
97
|
+
rprint(f"[red]File not found:[/red] {file}")
|
|
98
|
+
raise SystemExit(1)
|
|
99
|
+
|
|
100
|
+
if describe:
|
|
101
|
+
_run_describe(file)
|
|
102
|
+
elif filter_expr:
|
|
103
|
+
_run_polars_filter(file, filter_expr)
|
|
104
|
+
elif sql:
|
|
105
|
+
_run_duckdb(file, sql)
|
|
106
|
+
else:
|
|
107
|
+
_run_describe(file)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
if __name__ == "__main__":
|
|
111
|
+
typer.run(main)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[CmdletBinding()]
|
|
2
|
+
param()
|
|
3
|
+
Set-StrictMode -Version Latest
|
|
4
|
+
$ErrorActionPreference = 'Stop'
|
|
5
|
+
|
|
6
|
+
function Write-Step([string]$Message) { Write-Host "[setup-uv] $Message" }
|
|
7
|
+
|
|
8
|
+
Write-Step "detected os=$([System.Runtime.InteropServices.RuntimeInformation]::OSDescription) arch=$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)"
|
|
9
|
+
|
|
10
|
+
$uv = Get-Command uv -ErrorAction SilentlyContinue
|
|
11
|
+
if ($null -ne $uv) {
|
|
12
|
+
$current = (& uv --version) | Select-Object -First 1
|
|
13
|
+
Write-Step "uv already installed ($current) - upgrading"
|
|
14
|
+
& uv self update 2>$null
|
|
15
|
+
if ($LASTEXITCODE -ne 0) {
|
|
16
|
+
Write-Step "uv self update unavailable (package-manager install) - trying winget"
|
|
17
|
+
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
|
18
|
+
& winget upgrade --id=astral-sh.uv -e --accept-source-agreements --accept-package-agreements 2>$null
|
|
19
|
+
if ($LASTEXITCODE -ne 0) { & winget install --id=astral-sh.uv -e --accept-source-agreements --accept-package-agreements }
|
|
20
|
+
} else {
|
|
21
|
+
Write-Step "no winget; keeping current uv (already functional)"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
} else {
|
|
25
|
+
Write-Step "uv not found - installing latest via the official installer"
|
|
26
|
+
$installed = $false
|
|
27
|
+
try {
|
|
28
|
+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
29
|
+
$installed = $true
|
|
30
|
+
} catch {
|
|
31
|
+
Write-Step "official installer failed ($($_.Exception.Message)) - trying winget"
|
|
32
|
+
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
|
33
|
+
& winget install --id=astral-sh.uv -e --accept-source-agreements --accept-package-agreements
|
|
34
|
+
$installed = ($LASTEXITCODE -eq 0)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (-not $installed -and $null -eq (Get-Command uv -ErrorAction SilentlyContinue)) {
|
|
38
|
+
Write-Step "FAIL: could not install uv - install it manually per references/uv-setup.md"
|
|
39
|
+
exit 1
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if ($null -eq (Get-Command uv -ErrorAction SilentlyContinue)) {
|
|
44
|
+
$localBin = Join-Path $env:USERPROFILE '.local\bin'
|
|
45
|
+
if (Test-Path (Join-Path $localBin 'uv.exe')) { $env:Path = "$localBin;$env:Path" }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if ($null -eq (Get-Command uv -ErrorAction SilentlyContinue)) {
|
|
49
|
+
Write-Step "FAIL: uv still not on PATH after install - add %USERPROFILE%\.local\bin to PATH and retry"
|
|
50
|
+
exit 1
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
Write-Step "OK: $((& uv --version) | Select-Object -First 1)"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
log() { printf '[setup-uv] %s\n' "$*"; }
|
|
5
|
+
|
|
6
|
+
os="$(uname -s 2>/dev/null || echo unknown)"
|
|
7
|
+
arch="$(uname -m 2>/dev/null || echo unknown)"
|
|
8
|
+
log "detected os=${os} arch=${arch}"
|
|
9
|
+
|
|
10
|
+
case "$os" in
|
|
11
|
+
Darwin|Linux) ;;
|
|
12
|
+
MINGW*|MSYS*|CYGWIN*)
|
|
13
|
+
log "Git Bash / MSYS environment detected - installing the Windows build is not supported here."
|
|
14
|
+
log "Use the Linux installer inside WSL, or run scripts/setup-uv.ps1 in PowerShell instead."
|
|
15
|
+
exit 1
|
|
16
|
+
;;
|
|
17
|
+
*)
|
|
18
|
+
log "unsupported OS: ${os} - see references/uv-setup.md for manual steps."
|
|
19
|
+
exit 1
|
|
20
|
+
;;
|
|
21
|
+
esac
|
|
22
|
+
|
|
23
|
+
if command -v uv >/dev/null 2>&1; then
|
|
24
|
+
current="$(uv --version 2>/dev/null | head -n1)"
|
|
25
|
+
log "uv already installed (${current}) - upgrading"
|
|
26
|
+
if uv self update >/dev/null 2>&1; then
|
|
27
|
+
log "uv self update succeeded"
|
|
28
|
+
else
|
|
29
|
+
log "uv self update unavailable (package-manager install) - trying Homebrew"
|
|
30
|
+
if command -v brew >/dev/null 2>&1; then
|
|
31
|
+
brew upgrade uv >/dev/null 2>&1 || brew install uv
|
|
32
|
+
else
|
|
33
|
+
log "no Homebrew; keeping current uv (already functional)"
|
|
34
|
+
fi
|
|
35
|
+
fi
|
|
36
|
+
else
|
|
37
|
+
log "uv not found - installing latest via the official installer"
|
|
38
|
+
if command -v curl >/dev/null 2>&1; then
|
|
39
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
40
|
+
elif command -v wget >/dev/null 2>&1; then
|
|
41
|
+
wget -qO- https://astral.sh/uv/install.sh | sh
|
|
42
|
+
elif command -v brew >/dev/null 2>&1; then
|
|
43
|
+
log "no curl/wget - installing via Homebrew"
|
|
44
|
+
brew install uv
|
|
45
|
+
else
|
|
46
|
+
log "neither curl, wget, nor brew available - install one of them and re-run."
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
if ! command -v uv >/dev/null 2>&1; then
|
|
52
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
if ! command -v uv >/dev/null 2>&1; then
|
|
56
|
+
log "FAIL: uv still not on PATH after install - add \$HOME/.local/bin to PATH and retry."
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
log "OK: $(uv --version)"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: debugging
|
|
3
|
-
description: "MUST USE for any real runtime debugging across ANY language or binary — crashes, silent failures, wrong responses, stuck processes, memory leaks, async misbehavior, unexplained timing, reverse engineering. Runs a hypothesis-driven loop: form ≥3 hypotheses, investigate in parallel, after 2 failed rounds spawn Oracles from orthogonal angles, confirm root cause, lock with a failing test, fix minimally, QA by actually USING the system, scrub artifacts. The actual HOW lives in `references/` — READ THEM. Triggers: 'debug this', 'why is X not working', 'hanging', 'attach a debugger', 'reverse engineer', 'pwndbg', 'gdb', 'lldb', 'node inspect', '
|
|
3
|
+
description: "MUST USE for any real runtime debugging across ANY language or binary — crashes, silent failures, wrong responses, stuck processes, memory leaks, async misbehavior, unexplained timing, reverse engineering. Runs a hypothesis-driven loop: form ≥3 hypotheses, investigate in parallel, after 2 failed rounds spawn Oracles from orthogonal angles, confirm root cause, lock with a failing test, fix minimally, QA by actually USING the system, scrub artifacts. The actual HOW lives in `references/` — READ THEM. Triggers: 'debug this', 'why is X not working', 'hanging', 'attach a debugger', 'reverse engineer', 'pwndbg', 'gdb', 'lldb', 'node inspect', 'pdb', 'dlv', 'delve', 'rust-gdb', 'set a breakpoint', 'context window exploded', 'why is the response empty', 'why is this happening', 'trace this bug', 'reproduce and fix', 'silent failure', 'HTTP 200 but empty', 'why did it stop', 'inspect the binary', 'playwright', 'flaky test', 'fails intermittently', 'passes in isolation', 'only fails in CI'."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Debugging
|
|
@@ -238,8 +238,7 @@ Logging is part of the code you ship, and it has iron rules of its own: levels c
|
|
|
238
238
|
## DEPENDENCY UPGRADES — CROSS-CUTTING RULES
|
|
239
239
|
|
|
240
240
|
- **`0.x` minor = major.** Semver promises nothing below 1.0: treat `0.N → 0.N+1` as a breaking upgrade — read the changelog, build, and run the full suite before trusting it. A required field appearing in a public options type is a routine `0.x` "minor".
|
|
241
|
-
- **Version literals live outside the manifest.** Before committing a bump, grep the repo for the old version string: Dockerfiles pinning a global CLI, CI workflows,
|
|
242
|
-
- **Pin-parity contract tests are a pattern, not a nuisance.** A small test asserting the lockfile-resolved version equals the deploy artifact's pin (Dockerfile, image tag) turns silent drift into a red test. If the project has one, update it deliberately; if the bump reveals unguarded drift, add the test with the bump.
|
|
241
|
+
- **Version literals live outside the manifest.** Before committing a bump, grep the repo for the old version string: Dockerfiles pinning a global CLI, CI workflows, and docs all carry copies. A bump that updates only the package manifest ships a split-brain deploy.
|
|
243
242
|
- **Never hand-merge a lockfile.** On conflict, take either side whole and regenerate with the package manager — the resolver owns that file, not you.
|
|
244
243
|
|
|
245
244
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ulw-plan
|
|
3
|
-
description: "
|
|
3
|
+
description: "ACTIVATES ONLY on an explicit user request for the ulw-plan workflow: the user themselves saying ulw-plan, ulw plan, /skill:ulw-plan, or asking in their own words for a work plan before coding. NEVER self-activates: a bare ulw/ultrawork run, an agent-side routing decision, or reading this file is not a request, and the plan-gated reviewers (metis/momus) stay locked without a user request plus a written .omo/plans plan file. Explore-first planning consultant (Prometheus) that grounds in the codebase, asks only the forks exploration cannot resolve - or researches them to best practice when the intent is fuzzy - waits for explicit approval, then writes ONE decision-complete work plan a worker executes with zero further interview. Triggers: ulw-plan, ulw plan, plan this, make a plan, plan before coding, interview me, break this down, start planning, plan mode."
|
|
4
4
|
metadata:
|
|
5
5
|
short-description: Explore-first planning consultant that waits for your okay before planning
|
|
6
6
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ulw-research
|
|
3
|
-
description: "Maximum-saturation research orchestration: parallel explore+librarian swarms across codebase, web, official docs, and OSS repos
|
|
3
|
+
description: "Maximum-saturation research orchestration: ALWAYS proposes the final materials first (PDF+DOCX default), then parallel explore+librarian swarms across codebase, web, official docs, and OSS repos — max-roster teammode when the harness has it — with live journaling, a recursive EXPAND loop driven by leads workers return in message text, empirical verification by running code, and a cited synthesis with charts/Mermaid/assets behind a mandatory visual-QA gate. ACTIVATES ONLY on an explicit user demand for research — the word 'ulw-research' ('/ulw-research', '$ulw-research'), any 'ulw' research wording, 'ultradebate' or 'hyperdebate' research requests, or an explicit request for research / deep research / an ultra-precise investigation, in any language. Never self-activates for ordinary questions, debugging, or implementation context-gathering. While active it overrides exploration-bounding defaults: exhaustive coverage is the goal."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Codex Harness Tool Compatibility
|
|
@@ -52,8 +52,11 @@ The research is done when all of these hold:
|
|
|
52
52
|
- Claims that were contested, undocumented, or performance-shaped were proven or refuted by executed code.
|
|
53
53
|
- Every claim in the deliverable cites a source or a verification artifact.
|
|
54
54
|
- Every asserted claim is represented in the claim graph, tied to an intent-vs-reality diff when an expected truth exists, and backed by observation manifest entries from independent observation groups or a documented single-source exception; convergence or exception status is explicit.
|
|
55
|
-
-
|
|
56
|
-
- The
|
|
55
|
+
- The format-proposal gate was asked and answered BEFORE the first wave, and the final materials match that answer.
|
|
56
|
+
- The delivered artifact passed every delivery gate for this harness: visual QA on the rendered pages always, plus the proofread pass where the harness provides one (Phase 5).
|
|
57
|
+
- Every excursion opened during the run was closed by an EXIT rule, folded back into the claim or axis that triggered it, and recorded in both `excursion-log.md` and the ulw-loop ledger.
|
|
58
|
+
- The delivery message carries the closing briefing: how many sources the answer rests on (total + unique domains) and how many minutes the run took.
|
|
59
|
+
- The session journal reconstructs what was searched, found, and expanded, wave by wave, and it was written in real time rather than reconstructed at the end.
|
|
57
60
|
|
|
58
61
|
## Epistemic instrumentation
|
|
59
62
|
|
|
@@ -72,7 +75,12 @@ Observation candidates and claim candidates travel back from workers as message
|
|
|
72
75
|
Saturation research defaults to teammode, not isolated fire-and-forget workers: a lead one worker surfaces almost always reshapes what another should search next. When your harness gives you real cooperating members — Codex: the `teammode` skill (MultiAgentV2 agents, or `codex_app` threads as its fallback); OpenCode: `team_mode` — run this swarm as a team. Fall back to the background-worker swarm below only when team mode is unavailable, or the axes are genuinely independent with no cross-pollination expected.
|
|
73
76
|
|
|
74
77
|
- **One member per axis — by part, ownership, or perspective, never a job title.** Each Phase 0 axis is one member owning one concrete slice: a codebase part, a source territory, or a question lens. No two members share an angle. "Backend researcher" or "the web person" gives no real boundary and invites overlap — name what the member owns.
|
|
75
|
-
- **
|
|
78
|
+
- **Always the maximum roster.** The team is not sized by taste: fill every member slot your harness allows (OpenCode `team_mode` caps members at 8; Codex teammode has its own ceiling) on every run. If you can only name five axes, split the broadest one — by source territory, by time window, by perspective — until the roster is full. A half-empty team is a half-covered topic.
|
|
79
|
+
- **Compose deliberately across everything you can spawn.** Before writing the roster, enumerate what this session actually has — every delegation tier the harness or config defines and every spawnable role — and give each slot the cheapest tier that can do ITS job: broad recon on fast tiers, contested analysis on deep tiers, attack lanes on the strongest reasoning tier. Mixed tiers by design, never one tier across the whole board.
|
|
80
|
+
- **Routing words from the user are literal.** "quick", "fast", "deep", "all quick", "max parallel" — in any language — are hard instructions, not mood. Route exactly as asked and journal `requested tier -> spawned worker -> fallback reason` for every slot. Silently promoting a "quick" roster to a heavier tier is a defect, and so is dropping to a cheaper one without saying why.
|
|
81
|
+
- **Debate members are mandatory for ultradebate/hyperdebate, default otherwise.** At least one skeptic or red-team perspective attacks claims, evidence quality, source independence, synthesis structure, and report choices before they reach the deliverable. When the user says ultradebate or hyperdebate, run at least two attacking perspectives and give every contested claim a full round.
|
|
82
|
+
|
|
83
|
+
**One team, or a sequence — decided by scale and precision.** One team is the floor, not the ceiling. When the brief shows 6+ axes, several source territories, or a long final document — or a wrong claim is expensive (legal, medical, financial, procurement, public-facing) — run the research team to convergence, disband it, and stand up a REFINEMENT team from your strongest reasoning tiers whose only job is to attack and sharpen the synthesis before the document is written. A fresh premium team reading a finished journal reasons better than the same researchers grading their own homework. Build each team from a written brief and disband it before the next one starts; never leave two research teams live at once.
|
|
76
84
|
- **The raise law — broadcast every lead the instant it surfaces.** Members over-communicate relentlessly: every new lead, finding, contradiction, and dead end is raised to you the moment it surfaces, never hoarded for a final dump. Through long passes they send `WORKING: <axis> - <phase>`, and `BLOCKED: <reason>` the moment progress stops, so you always know a member is alive. Too many small updates is correct here; going quiet is the only failure.
|
|
77
85
|
- **You lead; expand on each raised lead.** Members raise via message text, never write session files. Journal each lead and spawn its expansion the instant it lands (Phase 2), not only when a member's final reply arrives.
|
|
78
86
|
|
|
@@ -81,7 +89,7 @@ Saturation research defaults to teammode, not isolated fire-and-forget workers:
|
|
|
81
89
|
Research workers (explore, librarian, browsing) differ by harness, but assume:
|
|
82
90
|
|
|
83
91
|
- **Read-only.** Most research workers cannot write files. Never ask a worker to write the journal or any session file — every journal write is yours.
|
|
84
|
-
- **No recursion.** Workers cannot spawn their own subagents. Depth comes from
|
|
92
|
+
- **No recursion — workers AND members.** Workers cannot spawn their own subagents, and team members must not re-orchestrate: a member researches its axis and reports; it never stands up its own team, loads this skill, or fans out a research swarm of its own. Depth comes from YOUR expansion waves. Say so in every spawn message — a member that starts its own research protocol burns the run's budget on duplicated orchestration and returns nothing you can cite.
|
|
85
93
|
- **Built-in brakes.** Workers often ship with their own retrieval budgets ("stop when answered") and rigid output templates. Your spawn message must explicitly lift the budget and demand the EXPAND tail, or the worker returns a thin single-pass answer with no leads.
|
|
86
94
|
- **Capability routing.** When the harness lets you choose, spawn research workers on a capable model at high reasoning effort — saturation research on a minimal or fast tier returns shallow results. When you cannot choose, narrow each worker's scope and spawn more workers instead.
|
|
87
95
|
|
|
@@ -111,7 +119,8 @@ Before spawning anything, decompose the query. Start from "what must be true if
|
|
|
111
119
|
<analysis>
|
|
112
120
|
Core question: <the actual information need>
|
|
113
121
|
Axes (3+ orthogonal): <axis — what to search, where, why> ...
|
|
114
|
-
Codebase relevant: <yes/no> · External: <yes/no> · Browsing: <yes/no> · Verification likely: <yes/no>
|
|
122
|
+
Codebase relevant: <yes/no> · External: <yes/no> · Browsing: <yes/no> · Verification likely: <yes/no>
|
|
123
|
+
Scale: <axis count, source territories, target document length> · Precision demand: <what a wrong claim costs here> → lifecycle: <single team | research team then refinement team>
|
|
115
124
|
</analysis>
|
|
116
125
|
```
|
|
117
126
|
|
|
@@ -125,6 +134,7 @@ This is `$SESSION_DIR`. The orchestrator owns the journal: you write every file
|
|
|
125
134
|
|
|
126
135
|
- `wave-<N>-<kind>-<axis>.md` — your digest of each worker return: key findings, sources with URLs, and the worker's EXPAND markers verbatim.
|
|
127
136
|
- `expansion-log.md` — per wave: workers spawned, markers gained, leads opened and closed.
|
|
137
|
+
- `excursion-log.md` — one ENTER row and one EXIT row per excursion: `excursion_id`, parent claim or axis, ENTER trigger, depth, workers spent, the EXIT rule that closed it, what it changed in the top-level answer (`none` is a valid, required answer), and the ulw-loop steer/evidence id it was mirrored into.
|
|
128
138
|
- `intent-diff.md` — orchestrator-owned expected-truth ledger comparing intent/spec/history to observed reality.
|
|
129
139
|
- `claim-graph.md` — orchestrator-owned claim graph linking every final assertion to observations, counterevidence, dependencies, and verdict.
|
|
130
140
|
- `observation-manifest.md` — orchestrator-owned observation manifest with `observed_at`, temporal validity, artifact paths, and contamination notes.
|
|
@@ -134,6 +144,21 @@ This is `$SESSION_DIR`. The orchestrator owns the journal: you write every file
|
|
|
134
144
|
|
|
135
145
|
Append each digest the moment its worker returns, not in a batch at the end — the journal is your recovery point after context loss and the user's audit trail.
|
|
136
146
|
|
|
147
|
+
### Run it as a loop, and journal in real time
|
|
148
|
+
|
|
149
|
+
ulw-loop is ON by default for this mode: when the `ulw-loop` skill is available, register the research axes as loop goals so the run has durable state and survives a compaction. The session directory's timestamp is the run's start clock — the closing briefing is computed from it, so create it once and never rename it. From that point every finding, source, quote, number, and lead is written into `$SESSION_DIR` **the instant it lands** — never held in the conversation for an end-of-run dump. After any context loss, re-read the brief and the journal before doing anything else, then resume from the open wave.
|
|
150
|
+
|
|
151
|
+
### Format-proposal gate — ALWAYS ask, before the first wave
|
|
152
|
+
|
|
153
|
+
Never guess the shape of the deliverable. After the decomposition and before spawning wave 1, propose the final materials and WAIT for the user's answer:
|
|
154
|
+
|
|
155
|
+
- **Default pair: PDF + DOCX.** Offer both as the baseline for any report/document request.
|
|
156
|
+
- Name the alternatives that actually fit THIS domain — slides for a briefing, standalone HTML for a living page, Markdown for a working note, several at once when the audience differs.
|
|
157
|
+
- Propose the TEMPLATE too, chosen from the domain and the user's own context: section skeleton, citation style, length target, language, and any house style they have used before. A prior document the user points at is the strongest template signal — read it and mirror its structure and tagging.
|
|
158
|
+
- Ask once, compactly: proposed format + proposed template + what each option costs. Then stop and wait. Guessing here wastes the entire assembly pass.
|
|
159
|
+
|
|
160
|
+
Record the answer in the journal; it is the binding contract for Phase 5.
|
|
161
|
+
|
|
137
162
|
## Phase 1 — Saturation wave
|
|
138
163
|
|
|
139
164
|
Launch the entire first wave in one turn — every axis at once, as team members if you formed a team, else as background workers. Sequential launches and "start with one and see" defeat the mode.
|
|
@@ -148,6 +173,8 @@ Scaling floor — more angles always justify more workers:
|
|
|
148
173
|
| Multi-faceted | 4 | 6 | 2 | 2 | 14 |
|
|
149
174
|
| Full due diligence | 4 | 6 | 3 | 2 | 15 |
|
|
150
175
|
|
|
176
|
+
**Disambiguate before you expand.** When the topic names something that could resolve several ways — a product, a person, a codename, a version — the first wave settles WHICH entity before any worker researches its history, benchmarks, or controversies: canonical name, first-party URL or account, whether it exists in the claimed category, and a confidence line. An unresolved entity never becomes a premise in a later wave's spawn message; that is exactly how a run starts inventing facts about something that does not exist.
|
|
177
|
+
|
|
151
178
|
Role protocols — embed the relevant one in each spawn message; every worker gets a unique angle:
|
|
152
179
|
|
|
153
180
|
- **Codebase (explore), 2-4 workers.** Grep with 3+ keyword variations; structural/AST search; LSP definitions and references; file-name globs; `git log --all -S '<keyword>'` and `--grep` for history including deleted code. Cross-validate hits across tools. Report absolute file paths, patterns with `file:line`, and how findings connect.
|
|
@@ -169,7 +196,7 @@ End your reply with the ## EXPAND tail: '- LEAD: <discovery> — WHY: <why> —
|
|
|
169
196
|
|
|
170
197
|
This loop is what makes the mode research rather than search. Collect returns as they land — and in team mode, act on each lead the moment a member raises it, never waiting for the full wave or a member's final reply:
|
|
171
198
|
|
|
172
|
-
1. Journal the return: digest plus verbatim EXPAND markers into `wave-<N>-<kind>-<axis>.md
|
|
199
|
+
1. Journal the return the moment it lands, never at the end of the wave: digest plus verbatim EXPAND markers into `wave-<N>-<kind>-<axis>.md`, appending each new source, quote, and number to the observation manifest in the same beat — after a compaction the journal, not your memory, is the state.
|
|
173
200
|
2. Deduplicate new markers against `expansion-log.md` — every lead ever seen, not just confirmed ones, or rejected leads resurface each wave.
|
|
174
201
|
3. Spawn an expansion worker immediately for each new unchecked lead:
|
|
175
202
|
|
|
@@ -180,7 +207,34 @@ PARENT: <which return surfaced it>. This is an explicit exhaustive-research assi
|
|
|
180
207
|
End your reply with the ## EXPAND tail.")
|
|
181
208
|
```
|
|
182
209
|
|
|
210
|
+
### Excursions — dive deep on a new find, then surface back out
|
|
211
|
+
|
|
212
|
+
The Phase 0 core question is the fixed goal of the run and never drifts. An excursion is a BOUNDED detour off the wave plan to chase something a return surfaced — you go deep, settle it, and come back up to the question you were hired to answer.
|
|
213
|
+
|
|
214
|
+
**ENTER (dive) only on a trigger.** One of these must hold, and you name which one:
|
|
215
|
+
|
|
216
|
+
1. The find contradicts a claim already locked in `claim-graph.md`.
|
|
217
|
+
2. It would change the final answer or a recommendation if it turned out to be true.
|
|
218
|
+
3. It exposes a source territory no axis owns, so nobody else will ever reach it.
|
|
219
|
+
4. The user's steering points at it — their words are the trigger, quoted verbatim.
|
|
220
|
+
|
|
221
|
+
Interest alone is not a trigger. Anything without one stays a queued lead in `expansion-log.md`, and the wave plan continues.
|
|
222
|
+
|
|
223
|
+
**Budget the dive before you take it.** State the worker count and the probe count for this level in the ENTER row. An excursion may spawn at most ONE nested sub-excursion; a third level means the thing has become its own research question — surface immediately and either promote it to a real axis with its own worker or record it as an out-of-scope gap in `SYNTHESIS.md`. When the `ulw-loop` skill is driving the run, a promotion is `omo ulw-loop steer --kind add_subgoal --title "<axis>" --objective "<what it must answer>" --evidence "<what surfaced it>" --rationale "<why the plan changes>"`.
|
|
224
|
+
|
|
225
|
+
**EXIT (surface) the moment any of these holds** — you do not need all of them:
|
|
226
|
+
|
|
227
|
+
- The ENTER trigger is resolved: the claim is confirmed, refuted, or its dependency is closed.
|
|
228
|
+
- Two consecutive probes changed nothing in the parent answer.
|
|
229
|
+
- The finding stops moving any claim's status — diminishing return is an exit, not a reason to push harder.
|
|
230
|
+
- The level's stated budget is spent.
|
|
231
|
+
|
|
232
|
+
**Fold back on the way out.** Every EXIT writes one line saying what the excursion changed in the top-level answer, and `none — <reason>` is a legitimate, required outcome; an excursion whose result is silently dropped is a lost run. Update the parent claim node or axis digest with the result, then mirror the whole excursion into the loop ledger — `omo ulw-loop steer --kind annotate_ledger --evidence "<what the excursion observed>" --rationale "<what it changed, or none>"`, and `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass|fail|blocked --evidence "<artifact>"` when it settled a criterion. After a compaction, `omo ulw-loop status --json` plus `excursion-log.md` tell you which excursions are still open.
|
|
233
|
+
|
|
234
|
+
**Anti-drift.** After every EXIT, re-read the core question in the journal and confirm the run still answers it. Three consecutive excursions that changed nothing end excursions for the run: converge on what you have.
|
|
235
|
+
|
|
183
236
|
4. Record the wave in `expansion-log.md`: spawned, markers gained, leads opened/closed.
|
|
237
|
+
5. **Relay the user's steering to everyone.** When the user changes scope, cadence, target sources, language, or format mid-run, broadcast it to every live worker and member immediately and record the exact wording in `expansion-log.md`. Steering only you saw silently splits the swarm's assignment from the user's actual ask.
|
|
184
238
|
|
|
185
239
|
**Convergence — the only stop rules while this mode is active.** Run at least 2 expansion waves on any multi-faceted query before claiming convergence; then stop only when one holds:
|
|
186
240
|
|
|
@@ -188,6 +242,8 @@ End your reply with the ## EXPAND tail.")
|
|
|
188
242
|
- 3 consecutive waves produced no new actionable leads.
|
|
189
243
|
- Expansion depth reached 5 waves — pause, show the open leads, and ask the user whether to extend.
|
|
190
244
|
|
|
245
|
+
**Never end the run on a worker's completion.** Workers finishing is not the deliverable; your synthesis is. Reserve the last fifth of the run's context and time for Phases 4-5 and stop opening waves the moment that reserve is threatened. A converged answer with two open leads beats nine finished workers and no report.
|
|
246
|
+
|
|
191
247
|
## Phase 3 — Verify contested claims by running code
|
|
192
248
|
|
|
193
249
|
Settle with executed code, not judgment, whenever sources disagree, a behavior is undocumented, a claim is performance- or compatibility-shaped, or the honest answer is "it should work". Spawn one verification worker per claim:
|
|
@@ -228,7 +284,7 @@ After convergence and all verifications, re-read the whole journal, start from `
|
|
|
228
284
|
|
|
229
285
|
```
|
|
230
286
|
# ULW-Research Synthesis: <query>
|
|
231
|
-
Workers: <total> · Waves: <count> · Sources: <count> · Verifications: <count>
|
|
287
|
+
Workers: <total> · Waves: <count> · Excursions: <count> · Sources: <count> (<unique domains> domains) · Verifications: <count> · Elapsed: <minutes> min
|
|
232
288
|
|
|
233
289
|
## Executive summary — 2-3 paragraphs answering the core question
|
|
234
290
|
## Findings by theme — per theme: consensus, evidence links, key quote (<20 words, attributed), verified yes/no
|
|
@@ -243,13 +299,53 @@ Workers: <total> · Waves: <count> · Sources: <count> · Verifications: <count>
|
|
|
243
299
|
|
|
244
300
|
`SYNTHESIS.md` is the citation source of truth for final materials: every claim carries inline `[Source N]` citations, and every high-risk non-code claim you assert must be a verified-claims row from Phase 3b. Assert nothing the gate left in the unresolved/refuted annex.
|
|
245
301
|
|
|
302
|
+
**Write the skeleton early and fill it as claims lock.** The moment the format gate is answered, create the deliverable file with its approved section headings and a `STATUS: draft — <n> sections open` line at the top. An interrupted run must leave a partial report on disk, never an empty directory and a lost conversation.
|
|
303
|
+
|
|
304
|
+
**Keep sourced numbers, assumptions, and derived results visibly apart.** Every quantitative claim carries its lineage: `MEASURED` (a number a source states, cited), `ASSUMED` (a coefficient, distribution, or scope you chose — say why), `DERIVED` (computed from those, showing the formula), plus a sensitivity line whenever the assumption moves the answer. Presenting a derived estimate with the confidence of a measured one is the most damaging thing this mode can ship.
|
|
305
|
+
|
|
306
|
+
**Search in English, deliver in the user's language.** Retrieval stays English-first (Search craft), but the synthesis and every final material are written in the language the user wrote to you in unless they ask otherwise — and a translated report still quotes its original-language sources verbatim.
|
|
307
|
+
|
|
246
308
|
## Phase 5 — Final materials
|
|
247
309
|
|
|
248
|
-
|
|
310
|
+
The format answered at the Phase 0 gate is binding. Absent an explicit user override, render **both PDF and DOCX**:
|
|
311
|
+
|
|
312
|
+
| Target | How |
|
|
313
|
+
|---|---|
|
|
314
|
+
| PDF (default) | Author the report as one self-contained HTML file, then print it headless: `chrome --headless --disable-gpu --no-pdf-header-footer --print-to-pdf=<out.pdf> file://<report.html>`. For CJK, embed a real webfont (Pretendard, Noto Sans KR) instead of trusting system fallbacks. `uv run --with weasyprint python` is the fallback renderer. |
|
|
315
|
+
| DOCX (default) | `pandoc <report.md> -o <out.docx>`, adding `--reference-doc=<template.docx>` when the user has a house style; `uv run --with python-docx python` when pandoc is unavailable. Charts and Mermaid renders go in as images. |
|
|
316
|
+
| Slides / deck | `uv run --with python-pptx python` — one claim per slide, a chart or diagram per claim. |
|
|
317
|
+
| Standalone HTML / Markdown | The authored source itself. |
|
|
318
|
+
|
|
319
|
+
Asset workers (background, parallel) — a research report without visuals is a wall of text nobody reads:
|
|
320
|
+
|
|
321
|
+
- **Charts for every quantitative finding, computed from real data.** Pull the numbers into an actual table first (CSV/JSON under `$SESSION_DIR`), then plot from that table, never from prose. Follow the data-scientist tool doctrine — numpy always, Polars for filtering/sorting/transforms, DuckDB for joins/aggregations/window functions, never pandas — and load the `data-scientist` skill when this session has it: `uv run --with numpy --with polars --with duckdb --with pyarrow --with matplotlib python`. Keep `pyarrow` in that set — the DuckDB-to-Polars handoff (`.pl()`) fails without it, and `.df()` fails without pandas, so hand data across through `.pl()`, never `.df()`. Save to `$SESSION_DIR/assets/`.
|
|
322
|
+
- **Mermaid graphs** for process, architecture, argument, timeline, and evidence-flow structure. Render each to SVG and confirm the file exists before the document references it.
|
|
323
|
+
- **Generated visuals** through the imagegen skill when a diagram, cover, or narrative visual earns its place.
|
|
324
|
+
- **Full-page screenshots** of the top 5-10 sources (browsing worker) as provenance you can show.
|
|
325
|
+
|
|
326
|
+
**Verify the asset manifest before rendering.** List every asset the document references, assert each file exists and is non-empty on disk, and re-render whatever is missing. A document that renders with three broken diagrams is a document you will publish twice.
|
|
327
|
+
|
|
328
|
+
Assembly worker — `task(category="deep", load_skills=["frontend", "visual-qa", "open-design", "data-scientist", "imagegen", "ulw-loop"], run_in_background=true, ...)`: before writing, read every available design and visualization skill and apply it — the report is a designed artifact, not a text dump. Use the template the user approved; absent a stronger house style the default skeleton is executive summary → key findings by theme → detailed analysis (quotes under 20 words with attribution, charts, Mermaid graphs, generated visuals, SHA-pinned permalinks, verification results) → comparative analysis when options compete → numbered sources with access dates → methodology appendix (workers, waves, searches, verifications, debate rounds) → correction log naming what verification overturned. Write it long and specific: every claim cites `[Source N]`, and the sources section lists every source the run actually used rather than a curated few.
|
|
329
|
+
|
|
330
|
+
### The delivery gates — every gate must PASS, in order
|
|
331
|
+
|
|
332
|
+
Nothing reaches the user until the gates pass:
|
|
333
|
+
|
|
334
|
+
1. **Visual QA (always).** Render the produced artifact back to images — PDF pages to PNG, the HTML in a real browser — and look at them: missing or broken figures, clipped tables, overflowing CJK text, blank pages, unreadable chart labels, wrong page breaks. Fix and re-render until the pages are clean. Reading the source markup is not visual QA; inspect the pixels.
|
|
335
|
+
2. **Proofread gate — `task(category="writing", ...)`.** Hand the final text to a dedicated `writing` worker whose only job is language: grammar, spelling, punctuation, terminology consistency, and whether the prose reads NATIVELY in the report's own language. It returns a defect list; fix every item and re-run the gate on the delta. Deliver only on a clean pass — this gate runs BEFORE the first delivery, not after the user finds the typo.
|
|
336
|
+
|
|
337
|
+
Then deliver: the artifact plus a compact chat-readable summary of what it says — the answer in a few sentences, the numbers that matter, and what to look at first. The document is the deliverable; the summary is what gets it read.
|
|
338
|
+
|
|
339
|
+
### The closing briefing — every run ends with it
|
|
340
|
+
|
|
341
|
+
The last thing the user reads states, in one compact block, what the answer is made of:
|
|
249
342
|
|
|
250
|
-
|
|
343
|
+
- **Sources.** How many sources the answer rests on and how many distinct domains they come from, counted from the journal's source ledger, not estimated. Name how many were primary sources and how many claims went to the unresolved/refuted annex.
|
|
344
|
+
- **Effort.** Workers, waves, excursions, and verifications — the same counters as the `SYNTHESIS.md` header.
|
|
345
|
+
- **Elapsed time, always.** Minutes from the run's start to delivery, derived from the session directory's own timestamp so it cannot be guessed: `python3 -c "import datetime,os,sys; s=datetime.datetime.strptime(os.path.basename(sys.argv[1]),'%Y%m%d-%H%M%S'); print(round((datetime.datetime.now()-s).total_seconds()/60))" "$SESSION_DIR"`.
|
|
251
346
|
|
|
252
|
-
|
|
347
|
+
Never ship the artifact without this block, and never fill it from memory — every number in it is read off the journal.
|
|
348
|
+
If you stood up a team, disband it and confirm every worker is terminal before the final answer.
|
|
253
349
|
|
|
254
350
|
## Search craft
|
|
255
351
|
|
|
@@ -281,3 +377,18 @@ High-yield combinations: official docs (`site:<docs domain>`), GitHub implementa
|
|
|
281
377
|
| Two workers given the same angle | One unique angle per worker, always |
|
|
282
378
|
| Contested claim settled by judgment | Phase 3 — run code, capture output, verdict |
|
|
283
379
|
| Deliverable claims without citations | Every claim cites a source or a verification artifact |
|
|
380
|
+
| Guessing the deliverable format instead of asking | The format gate is unconditional: propose PDF+DOCX plus the domain-fitting alternatives and the template, then wait before wave 1 |
|
|
381
|
+
| A roster smaller than the harness ceiling | Fill every member slot; split the broadest axis until the team is full |
|
|
382
|
+
| One tier across the whole roster | Mixed tiers by design — cheap breadth, premium attack |
|
|
383
|
+
| Silently re-routing a "quick"/"fast" instruction | Routing words are literal; journal requested -> spawned -> fallback per slot |
|
|
384
|
+
| A worker or member that starts its own research swarm | Members research one axis and report; orchestration is yours alone |
|
|
385
|
+
| Expanding on an entity the first wave never disambiguated | Settle canonical identity and first-party source before any later spawn asserts it |
|
|
386
|
+
| Batching findings into an end-of-run journal dump | Journal each return as it lands; the journal is what survives a compaction |
|
|
387
|
+
| Ending the run because every worker finished | Reserve the final fifth of the run for synthesis and materials |
|
|
388
|
+
| A derived estimate presented as a measured number | MEASURED / ASSUMED / DERIVED lineage on every quantitative claim, plus a sensitivity line |
|
|
389
|
+
| Delivering before the delivery gates pass | Visual QA on rendered pages always, plus the harness's proofread gate — a typo the user finds means a gate did not run |
|
|
390
|
+
| Referencing an asset that is not on disk | Verify the asset manifest before rendering; re-render whatever is missing |
|
|
391
|
+
| Chasing an interesting find with no ENTER trigger | Excursions need a named trigger; everything else stays a queued lead |
|
|
392
|
+
| An excursion that never came back, or drifted into a new mission | EXIT rules are unconditional; depth 3 means promote it to an axis or record it as a gap |
|
|
393
|
+
| An excursion whose result was never folded back | Every EXIT writes what it changed in the top-level answer, `none` included, and mirrors into the loop ledger |
|
|
394
|
+
| Delivering without the closing briefing | Source count, unique domains, and elapsed minutes are read off the journal and stated every time |
|
|
@@ -3,3 +3,4 @@ export declare const DEFAULT_CATEGORIES: Record<string, CategoryConfig>;
|
|
|
3
3
|
export declare const CATEGORY_PROMPT_APPENDS: Record<string, string>;
|
|
4
4
|
export declare const CATEGORY_DESCRIPTIONS: Record<string, string>;
|
|
5
5
|
export declare const CATEGORY_PROMPT_APPEND_RESOLVERS: Record<string, (model: string | undefined) => string>;
|
|
6
|
+
export declare const BUILTIN_CATEGORY_REQUIRES_MODEL: Record<string, string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AvailableCategory, AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
|
|
2
|
-
export { CATEGORY_DESCRIPTIONS, CATEGORY_PROMPT_APPENDS, CATEGORY_PROMPT_APPEND_RESOLVERS, DEFAULT_CATEGORIES, } from "./builtin-categories";
|
|
2
|
+
export { BUILTIN_CATEGORY_REQUIRES_MODEL, CATEGORY_DESCRIPTIONS, CATEGORY_PROMPT_APPENDS, CATEGORY_PROMPT_APPEND_RESOLVERS, DEFAULT_CATEGORIES, } from "./builtin-categories";
|
|
3
3
|
/**
|
|
4
4
|
* System prompt prepended to plan agent invocations.
|
|
5
5
|
* Instructs the plan agent to first gather context via explore/librarian agents,
|