Commit Graph

5332 Commits

Author SHA1 Message Date
YeonGyu-Kim c3b98c4bfb feat(agents): mandate surface-matched manual QA tools on Opus 4.7 full delegation
The existing FULL DELEGATION manual-QA rule said 'use it yourself' but
left the choice of tool implicit. Make it explicit and non-optional, so
the agent cannot satisfy the gate by reading the source instead of
running the artifact.

Surface → tool mapping:
- TUI / CLI work → interactive_bash (tmux). Launch in real terminal,
  send keystrokes, run happy path, try bad input, hit --help.
- Web / browser / UI work → playwright skill. Drive a real browser,
  click elements, fill forms, watch console, screenshot if helpful.
- HTTP API / service work → curl or integration script against the
  running service.
- Library / SDK work → minimal driver script that imports + executes.
- Other surfaces → ask how a real user would discover it works, then
  do that.

Frame the gate as a contract violation when bypassed: reporting
'implementation complete' without using the matching tool is the same
failure pattern as deleting a failing test for a green build.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:38:49 +09:00
YeonGyu-Kim 9e7b39102b feat(agents): require manual end-to-end QA on full-delegation Opus 4.7 tasks
Existing <verification> required tests pass + lsp clean + build green, but
that is insufficient for end-to-end delegation. Tests cover known cases;
they do not cover whether the user-visible feature actually works.

Add a NON-NEGOTIABLE rule: when the user hands off end-to-end ("ulw",
"implement and finish", "do the whole thing", "make it work", "ship it"),
verification escalates to:

1. BUILD the actual artifact
2. USE IT YOURSELF as a real user would
3. VERIFY end-to-end behavior matches the spec
4. TASK NOT DONE until usage confirms it works

Reporting "implementation complete" without having USED the artifact is
explicitly framed as a contract violation. Defects discovered during this
QA pass are the agent's to fix in the same turn.

This complements the existing 'lsp_diagnostics catches type errors, not
logic bugs' line by giving full-delegation cases a sharper, named gate.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:30:48 +09:00
YeonGyu-Kim 9feb9f6fe5 refactor(agents): distill SMART production-prompt patterns into Opus 4.7 Sisyphus
Replace verbose v1 prompt with prose-dense, strong-directive version
that pulls in production-grade rules from a captured SMART agent prompt
while keeping all OhMyOpenCode-specific orchestration content.

Net additions:
- <autonomy_and_persistence>: redirect-as-refinement, never-revert-others-work,
  diagnose-before-retry. Critical for multi-agent worktree safety.
- <investigate_before_acting>: never speculate, ground every claim in tool output.
- <pragmatism_and_scope>: anti-overengineering rules. DUPLICATION > PREMATURE
  ABSTRACTION. Pairs naturally with Opus 4.7 literal-following.
- <verification>: report faithfully, never game tests, evidence requirements.
- <executing_actions_with_care>: reversibility framework with destructive examples.
- <using_subagents>: tighter spawning rules + summarize-result mandate.
- <file_links>: fluent file:// linking format for clickable references.

Trims:
- Mythology and redundant identity bullets compressed in <role>.
- <self_knowledge> stripped of redundancies (parallel/effort/progress/tone
  duplicated elsewhere); kept only literal-following + fewer-subagents.
- <example_subagent_spawning> reduced from 4 examples to 1.
- <example_session_continuity> dropped (prose covered it).
- <communication_style> compressed from 30 lines to 5 strong directives.
- Code Changes redundant rules removed (already in hardBlocks).

Strong-directive style: bold/CAPS on load-bearing rules per user preference.

Net result: 20,527 chars (down from 26,310 v1) yet richer behavioral coverage.
40/40 sacred-behavior + SMART-addition checks pass. LSP clean.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:26:58 +09:00
YeonGyu-Kim 241fb70a4a test(delegate-task): add background-task test coverage
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:15:42 +09:00
YeonGyu-Kim e1b2fa9a14 test(call-omo-agent): add sync-executor test coverage
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:15:41 +09:00
YeonGyu-Kim bda7fdbbda test(background-agent): add spawner test coverage
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:15:40 +09:00
YeonGyu-Kim 2024c0cb84 feat(agents): wire Claude Opus 4.7 support into Sisyphus agent
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:15:38 +09:00
YeonGyu-Kim 41d4cbe811 feat(agents): add Claude Opus 4.7 native Sisyphus prompt builder
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:15:35 +09:00
YeonGyu-Kim 215c8f2315 feat(agents): add isClaudeOpus47Model type guard
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 21:15:31 +09:00
YeonGyu-Kim 8ad50b7e93 docs(agents): replace ZWSP policy with sort-shim policy
Document the canonical ordering mechanism (Array.prototype.toSorted/sort shim in src/shared/agent-sort-shim.ts) and forbid ZWSP, U+2060, U+00AD, ANSI escape, and ASCII space prefixes. Reference sst/opencode#19127 as the upstream fix that will obsolete the shim.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 18:59:49 +09:00
YeonGyu-Kim 333ad3aadd refactor(agents): drop ZWSP prefixes from agent display names
The sort shim from the previous commit enforces canonical core ordering at runtime, so ZWSP prefixes are no longer needed. Removing them eliminates the Bun.stringWidth vs terminal-width drift that broke the TUI status bar (#3259).

Drop AGENT_LIST_SORT_PREFIXES and getAgentRuntimeName from agent-display-names; switch all call sites to getAgentDisplayName. getAgentListDisplayName stays as a thin alias for external importers.

Keep stripInvisibleAgentCharacters and the ZWSP regex paths so legacy session state and configs from v3.14.0-v3.16.0 still resolve.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 18:59:49 +09:00
YeonGyu-Kim dffe5a305b feat(agents): add narrowly-scoped agent sort shim and install at plugin entry
OpenCode 1.4.x ignores the agent `order` field (sst/opencode#19127), so its
`Agent.list()` sorts purely by `agent.name` via Remeda `sortBy` which uses
native string `<`/`>` comparison. Without intervention, the four core agents
fall into alphabetical order (Atlas -> Hephaestus -> Prometheus -> Sisyphus),
which is not the canonical sisyphus -> hephaestus -> prometheus -> atlas order
the project ships.

Prior attempts to bias the sort key with invisible characters (ZWSP,
U+2060 WORD JOINER, U+00AD SOFT HYPHEN, ANSI escape) all caused
`Bun.stringWidth()` vs terminal-width drift, producing visible gaps and
column truncation in the TUI status bar (#3259, #3238).

Solution: a narrowly-scoped shim of `Array.prototype.toSorted` and
`Array.prototype.sort` that activates only when the array contains two or
more agent objects whose `.name` matches a canonical core display name.
The activation predicate guards against mixed-type arrays so unrelated
`.sort()` / `.toSorted()` calls (string arrays, number arrays, mixed
objects) execute native behavior unchanged. Install is idempotent.

Cubic P1 mitigations from PR #3267:
- `isAgentArray` rejects any array with non-object or null elements,
  eliminating the throw-on-mixed-array failure mode.
- Strict activation predicate (>= 2 ranked elements) keeps the global
  prototype patch from affecting unrelated sort calls.

Remove this shim once OpenCode honors the agent `order` field
(sst/opencode#19127).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 18:55:33 +09:00
YeonGyu-Kim 557d66fc4c Merge pull request #3675 from code-yeongyu/fix/ralph-loop-remove-recovery-window
fix(ralph-loop): remove redundant recovery window that stalls loop after errors (fixes #3235)
2026-04-27 18:53:02 +09:00
YeonGyu-Kim c2a41a3519 Merge pull request #3674 from code-yeongyu/fix/doctor-parse-multi-slash-model
fix(doctor): parse provider/model with indexOf for multi-slash IDs (fixes #3380)
2026-04-27 18:52:58 +09:00
YeonGyu-Kim fe428ab02f Merge pull request #3673 from code-yeongyu/fix/single-task-directive-no-refuse
fix(atlas): replace REFUSE language in SINGLE_TASK_DIRECTIVE with execution protocol (fixes #1262)
2026-04-27 18:52:54 +09:00
YeonGyu-Kim bde2955f8c fix(ralph-loop): remove stale error recovery window
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 18:22:53 +09:00
YeonGyu-Kim 69c37e3965 test(ralph-loop): cover non-abort error continuation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 18:22:53 +09:00
YeonGyu-Kim e95a37fd3c fix(doctor): parse multi-slash model IDs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 18:21:06 +09:00
YeonGyu-Kim c27d52e2b8 fix(atlas): replace single task refusal directive
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 18:18:40 +09:00
YeonGyu-Kim 2e6b3b7f76 Merge pull request #3669 from code-yeongyu/fix/ralph-loop-zwsp-agent
fix(ralph-loop): strip ZWSP from agent name before promptAsync (fixes #3253)
2026-04-27 18:09:35 +09:00
YeonGyu-Kim baf3e939f5 Merge pull request #3671 from code-yeongyu/fix/file-reference-env-var-expansion
fix(file-reference-resolver): expand $VAR env vars in @path file references (fixes #3476)
2026-04-27 18:09:30 +09:00
YeonGyu-Kim 1f9d9e3d60 Merge pull request #3672 from code-yeongyu/fix/ralph-loop-bg-task-guard
fix(ralph-loop): skip continuation when background tasks are pending (fixes #3526)
2026-04-27 18:09:29 +09:00
YeonGyu-Kim ae7cdccbc4 Merge pull request #3670 from code-yeongyu/fix/default-agent-config-key-normalization
fix(plugin-handlers): normalize default_agent config key before runtime-name lookup (fixes #3313)
2026-04-27 18:09:25 +09:00
YeonGyu-Kim d0dee70f9d fix(ralph-loop): skip idle continuation during background tasks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:52:45 +09:00
YeonGyu-Kim f429e539fa test(ralph-loop): cover background task idle guard
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:52:45 +09:00
YeonGyu-Kim a46b7b8240 fix(file-reference-resolver): expand env vars in path references
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:45:27 +09:00
YeonGyu-Kim 9081475ec0 fix(plugin-handlers): normalize default agent runtime lookup
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:44:15 +09:00
YeonGyu-Kim c92f841688 fix(ralph-loop): normalize continuation agent names
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:40:46 +09:00
YeonGyu-Kim 5e4aa8b827 Merge pull request #3667 from code-yeongyu/fix/dev-browser-provider-gating
fix(builtin-skills): treat dev-browser as a selectable browser provider (fixes #3411)
2026-04-27 17:35:24 +09:00
YeonGyu-Kim f1d4eb7846 fix(skill-context): filter dev-browser as provider-gated
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:31:07 +09:00
YeonGyu-Kim 0d3eed17a5 fix(builtin-skills): gate dev-browser by provider selection
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:31:07 +09:00
YeonGyu-Kim a835fefea5 Merge pull request #3665 from code-yeongyu/fix/posthog-arch-cpus-crash
fix(posthog): guard os.cpus() against Bun /sys/firmware permissions error (fixes #3496)
2026-04-27 17:31:00 +09:00
YeonGyu-Kim ee260fbcc7 Merge pull request #3666 from code-yeongyu/fix/minimax-kimi-thinking-param
fix(model-capabilities): mark minimax/non-thinking-kimi as supportsThinking:false (fixes #3590)
2026-04-27 17:30:45 +09:00
YeonGyu-Kim 194d66826a Merge pull request #3668 from code-yeongyu/fix/skills-override-resolution
fix(agents): resolve skills override into agent prompt post-merge (fixes #3544)
2026-04-27 17:30:40 +09:00
YeonGyu-Kim dbf0bb9b4c test(agents): cover skills override prompt injection
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:18:37 +09:00
YeonGyu-Kim aeb4419172 fix(agents): resolve skills after agent overrides
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:18:37 +09:00
YeonGyu-Kim 71c29c8fe0 fix(model-capabilities): disable thinking for minimax and non-thinking kimi
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:15:56 +09:00
YeonGyu-Kim d1bc25a6ce fix(posthog): guard CPU telemetry collection
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 17:14:00 +09:00
github-actions[bot] d32300a6c5 @islee23520 has signed the CLA in code-yeongyu/oh-my-openagent#3664 2026-04-27 07:59:11 +00:00
YeonGyu-Kim 1da7df1aee Revert "Merge pull request #3657 from code-yeongyu/refactor/replace-zwsp-with-real-spaces"
This reverts commit f1a11f2c92, reversing
changes made to 62c19ce0ef.
2026-04-27 15:54:05 +09:00
YeonGyu-Kim 9823462994 Merge pull request #3661 from code-yeongyu/fix/doctor-heuristic-model-status
fix(doctor): suppress resolved model capability warnings
2026-04-27 15:44:38 +09:00
YeonGyu-Kim a696c8a67c fix(hooks): apply Sisyphus GPT-5.5 variant
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 15:37:39 +09:00
YeonGyu-Kim f1a11f2c92 Merge pull request #3657 from code-yeongyu/refactor/replace-zwsp-with-real-spaces
refactor(agents): replace broken ZWSP sort prefixes with leading ASCII spaces
2026-04-27 15:36:51 +09:00
YeonGyu-Kim 136a54f467 fix(doctor): avoid warnings for resolved model capabilities
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 15:31:48 +09:00
YeonGyu-Kim 8e785963cf fix(model-capabilities): recognize current provider aliases
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 15:31:48 +09:00
YeonGyu-Kim f100a8565b fix(agents): keep object keys clean by separating list display from runtime name
Discovered via post-implementation review (Oracle goal verification): the
prior commit's prefix swap (ZWSP -> ASCII spaces) inherited a pre-existing
architectural bug from the ZWSP era. `getAgentListDisplayName()` was an
alias for `getAgentRuntimeName()`, which meant every callsite that used
the "list display" name as an OBJECT KEY (config.agent keys, lookup keys,
HTTP-header-bound paths) ended up carrying the sort prefix.

This worked silently with ZWSP because zero-width characters are visually
invisible. With ASCII space prefixes, the same bug becomes user-visible
and violates the explicit RFC 7230 constraint documented in AGENTS.md:
"ZWSP MUST NOT appear in object keys (used as HTTP header values)."

Fix: separate the two concepts that were conflated.

- `getAgentListDisplayName(key)` now returns the CLEAN display name
  (alias of `getAgentDisplayName`). Used for object keys, config keys,
  and any path where the name will be sent over HTTP.
- `getAgentRuntimeName(key)` keeps its prefixed return value. Used ONLY
  for the `.name` field that OpenCode reads for `localeCompare` sort.

`agent-key-remapper.ts` was already correct: it uses `getAgentRuntimeName`
for the `.name` field. The bug was that `getAgentListDisplayName` (used
as the object key) also returned the prefix.

Test updates:
- agent-display-names.test.ts splits the assertions: getAgentListDisplayName
  asserts clean names, new getAgentRuntimeName describe asserts prefixes
- All other tests using getAgentListDisplayName as an expected object key
  continue to pass because they always wanted clean names

Verification:
- bun test: 5769 pass / 10 pre-existing failures (unchanged)
- bun run typecheck: clean
- Manual: agent-key-remapper output keys verified RFC 7230 safe (no
  leading whitespace, no ZWSP); name fields preserve descending-space
  prefix for canonical core agent ordering
2026-04-27 15:30:20 +09:00
YeonGyu-Kim 62c19ce0ef Merge pull request #3659 from code-yeongyu/fix/dotted-opus-frontier-tools
fix(agents): cover dotted opus frontier model
2026-04-27 14:48:32 +09:00
YeonGyu-Kim 80791f10bc fix(agents): cover dotted opus frontier model
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 14:40:16 +09:00
YeonGyu-Kim 3f30dac3f1 Merge pull request #3656 from code-yeongyu/feature/hide-grep-glob-for-frontier-agents
fix(agents): hide grep glob for frontier agents
2026-04-27 14:31:30 +09:00
YeonGyu-Kim acf293de96 fix(tmux): validate fallback port
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-27 14:24:42 +09:00