Commit Graph

857 Commits

Author SHA1 Message Date
YeonGyu-Kim 708891dabe test: fix stale expectations after gpt-5.5 model promotion
Updates test expectations across agent, cli, shared, plugin, and tools tests

to match gpt-5.5 as the new default for oracle, hephaestus, and deep agents.

Includes snapshot updates for model-fallback tests.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-24 16:17:44 +09:00
YeonGyu-Kim 3bab66b96c feat(models): promote gpt-5.5 as default for oracle, hephaestus, and deep
Now that each of these agents ships a native gpt-5.5 prompt variant,
their default OpenAI model is bumped from gpt-5.4 to gpt-5.5. The
gpt-5.4 entries are removed from the same-provider position in each
fallback chain (a single provider doesn't need both version entries -
if gpt-5.5 isn't available there, cross-provider fallback kicks in).

- oracle.fallbackChain: gpt-5.5 high (openai) -> gemini-3.1-pro -> claude -> glm
- hephaestus.fallbackChain: gpt-5.5 medium (openai only, requiresProvider)
- deep category.fallbackChain: gpt-5.5 medium -> claude -> gemini
- deep category.config: openai/gpt-5.5 medium

No changes to sisyphus, sisyphus-junior, ultrabrain, momus, or other
agents that still point at gpt-5.4; those stay on the shared regex-
based routing in the gpt-5-4 prompt family.
2026-04-24 13:06:50 +09:00
YeonGyu-Kim 1ecf5ab8f2 refactor(ast-grep): inline tool descriptions and simplify pattern hints
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-22 12:56:10 +09:00
YeonGyu-Kim 2f4b1c3158 feat(ast-grep): rewrite tool descriptions to prevent regex-style misuse
The previous description (41 words) told the LLM to write 'complete AST
nodes' but did not explain that regex syntax is the #1 failure mode. It
also shipped a bug: the Python example 'def $FUNC($$$):' had a trailing
colon that the hint system actively flags as wrong.

Extract descriptions into tool-descriptions.ts and rewrite:
- Open with 'This is NOT regex' so the constraint is unmissable
- List the four regex patterns that do not work (|, .*, \\w, [a-z])
  with the corrective action for each
- Tell the LLM to switch to grep when the pattern is text-shaped
- Fix the Python example (no trailing colon) and add Go and Rust rows
  since the failing reports came from Go codebases
- Shorten the pattern-param description with the same anti-regex list

Also harden the LSP reference for the new test files using the
bun-types triple-slash directive already used elsewhere.
2026-04-22 12:26:24 +09:00
YeonGyu-Kim 95ccbbfe8c feat(ast-grep): detect regex-style pattern misuse before returning empty results
LLMs frequently call ast_grep_search with regex-style patterns like
'func.*build|BuildMode|projectReferences' instead of AST patterns. The
search silently returns zero matches with no useful feedback, so the
model retries with a different regex-shaped pattern and loops.

Extract hint generation into pattern-hints.ts and add detectors for the
four dominant misuse modes:
- regex escapes (\\w, \\d, \\s, \\b)
- character-class ranges ([a-z], [0-9])
- regex wildcards (.* .+) with no meta-vars
- pure alternation (foo|bar|baz with no structural syntax)

Heuristics are designed to be safe on valid AST patterns: bitwise OR
'$A | $B' and Rust closures '|x| x + 1' are not flagged. Language-
specific shape hints (trailing-colon Python, body-less JS/TS/Go/Rust
functions) are preserved and extended to Go and Rust.
2026-04-22 12:23:51 +09:00
YeonGyu-Kim 064dcc844e fix(delegate-task): remove deprecated sync continuation fallback
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:56:05 +09:00
YeonGyu-Kim a17ba1673e chore(delegate-task): remove unused metadata model export
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:51:19 +09:00
YeonGyu-Kim 54e48de7f8 refactor(delegate-task): extract background session registration helpers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:50:28 +09:00
YeonGyu-Kim 2585031f54 refactor(delegate-task): extract sync continuation resume context
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:48:58 +09:00
YeonGyu-Kim 4810d0f1bd fix(delegate-task): apply load_skills content to continuation prompts
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:36:24 +09:00
YeonGyu-Kim d0a3cb3936 fix(delegate-task): align background-continuation title with args.description
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:33:45 +09:00
YeonGyu-Kim 83c8ffbe01 fix(delegate-task): include category in continuation task_metadata blocks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:33:05 +09:00
YeonGyu-Kim b5bc4cd404 fix(delegate-task): preserve variant in sync-continuation metadata model
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:32:16 +09:00
YeonGyu-Kim 54cc9b7ca4 test(delegate-task): lock Oracle-found gaps with TDD
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 15:29:32 +09:00
YeonGyu-Kim 3f28e42483 refactor(delegate-task): remove AI slop from supporting files
Tighten resolve-metadata-model runtime guards, tidy tool-argument-preparation
subagent-type override logging, and trim a redundant literal in the
metadata-model-unification test. Behavior preserved (328 tests pass).
2026-04-20 15:20:45 +09:00
YeonGyu-Kim bcf95112ca refactor(delegate-task): remove AI slop from executor metadata paths
Strip obvious comments, over-defensive guards, and dead branches across
the five delegate-task executor files while preserving all metadata
propagation behavior added in prior commits. Regression tests remain
green (328 pass / 0 fail).
2026-04-20 15:16:48 +09:00
YeonGyu-Kim 271068d871 chore(delegate-task): remove unused execute field from DelegateTaskArgs
The execute field with { task_id, task_dir } was defined but never referenced anywhere in the codebase. Removing dead code simplifies the type surface and prevents accidental future misuse.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:53:44 +09:00
YeonGyu-Kim cd0c98e54d fix(delegate-task): preserve model variant in metadata resolution
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:53:31 +09:00
YeonGyu-Kim a82f0560cc test(delegate-task): add failing tests for model variant preservation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:53:31 +09:00
YeonGyu-Kim f486df71ae feat(delegate-task): preserve raw subagent_type across metadata
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:50:40 +09:00
YeonGyu-Kim 8a2a11b210 fix(delegate-task): propagate category in background continuation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:50:18 +09:00
YeonGyu-Kim 9bd5829a76 fix(delegate-task): propagate agent and category in sync continuation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:50:11 +09:00
YeonGyu-Kim 9bf89deee3 test(delegate-task): add failing tests for metadata continuation gaps
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-20 14:49:35 +09:00
Sisyphus a6a5a08b56 fix(tools/skill): invalidate skill cache at session boundary 2026-04-18 17:21:09 +09:00
Sisyphus 1d187097f3 test(tools/skill): cover per-session skill cache invalidation 2026-04-18 17:17:23 +09:00
YeonGyu-Kim bd1529825c fix(test): isolate skill factory discovery in ci
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 15:24:19 +09:00
Sisyphus 8e3f4cc63c fix(tools/skill): harden description pipeline against empty skill list after lazy factory 2026-04-18 14:57:44 +09:00
Sisyphus 0e1a946c1d test(skill-tool): isolate skill discovery spies from other suites 2026-04-18 14:57:30 +09:00
Sisyphus 61675adbf1 test(slashcommand): isolate command-loader cache between tests 2026-04-18 14:53:14 +09:00
Sisyphus 82ddc9c6f7 Merge branch 'fix/perf-d07' into fix/perf-omo-in-tree 2026-04-18 14:43:37 +09:00
YeonGyu-Kim 1be1cd6e53 fix(tools/skill): make factory pure and stop defeating skill-loader cache 2026-04-18 14:15:14 +09:00
YeonGyu-Kim 40bd3e02d2 test(tools/skill): cover factory laziness and skill-cache invariants 2026-04-18 14:14:00 +09:00
YeonGyu-Kim 7be6ab4478 fix(tools/slashcommand): skip EXCLUDED_DIRS in recursive command discovery
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 14:10:26 +09:00
YeonGyu-Kim d0eda8b4bf test(tools/slashcommand): cover excluded-dir pruning during discovery
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 14:09:34 +09:00
YeonGyu-Kim 1b5f3167eb Merge pull request #3492 from code-yeongyu/refactor/legacy-plugin-decoupling
refactor: modernize plugin entry to V1 format and decouple legacy/tightly-coupled code
2026-04-18 03:10:14 +09:00
YeonGyu-Kim 70ddc01e10 refactor: remove AI slop from refactored files
Behavior-preserving cleanup of AI-generated code smells in 5 files authored/moved by this PR:

- src/hooks/model-fallback/fallback-state-controller.ts (-47/+47 net reorganization, redundant defensiveness removed)
- src/shared/model-string-parser.ts (-4 LOC obvious-comment cleanup)
- src/shared/ripgrep-cli.ts (-13 LOC obvious comments + redundant defensive checks)
- src/tools/delegate-task/tool-description.ts (-6 LOC)
- src/tools/look-at/look-at-input-preparer.ts (-6 LOC)

Targets: obvious comments that restate code, over-defensive null checks on guaranteed values, redundant existence checks. No public API signatures changed, no type hints removed, no new abstractions introduced. Full test suite still passes.
2026-04-18 03:01:51 +09:00
YeonGyu-Kim e6f84f713b refactor(tools): break glob->grep sibling-tool coupling
Hoist shared ripgrep CLI resolution helpers (resolveGrepCli, resolveGrepCliWithAutoInstall, GrepBackend, DEFAULT_RG_THREADS, ResolvedCli) out of src/tools/grep/constants.ts into src/shared/ripgrep-cli.ts so they no longer straddle two sibling tool directories.

Before: src/tools/glob/constants.ts re-exported from src/tools/grep/constants.ts, violating the project's "tools should not import from sibling tools" rule enforced by .sisyphus/rules/modular-code-enforcement.md.

After: both src/tools/glob/ and src/tools/grep/ consume the shared helpers from src/shared/ripgrep-cli.ts. src/tools/grep/constants.ts keeps only the grep-specific UI-exposed constants.
2026-04-18 02:38:24 +09:00
YeonGyu-Kim 5e4102566c refactor(model-fallback): fully encapsulate session state in factory closure
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 02:35:46 +09:00
YeonGyu-Kim 0f1b16567a refactor(delegate-task): split tools.ts to comply with 200 LOC module rule
Extract the tool description/category metadata into tool-description.ts and move argument normalization plus validation into tool-argument-preparation.ts. This keeps createDelegateTask focused on orchestration while preserving behavior and bringing tools.ts under the module LOC rule.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 01:52:12 +09:00
YeonGyu-Kim db056346d2 refactor(shared): move parseModelString out of delegate-task to break cross-tool coupling
Move parseModelString into src/shared so callers can depend on a neutral module instead of reaching into delegate-task internals.

Cross-tool coupling violates module boundaries, and this keeps call-omo-agent plus runtime-fallback from importing through a sibling tool.
2026-04-18 01:51:26 +09:00
YeonGyu-Kim 963355d241 refactor(look-at): split tools.ts to comply with 200 LOC module rule
Extract input preparation and image conversion handling into look-at-input-preparer.ts.

Extract prompt construction and multimodal session execution into look-at-prompt.ts and look-at-session-runner.ts while keeping createLookAt stable.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 01:45:30 +09:00
YeonGyu-Kim f94632ce64 refactor(skill-mcp): split tools.ts to comply with 200 LOC module rule
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-18 01:43:08 +09:00
YeonGyu-Kim 5759a9c503 docs(agents): refresh AGENTS.md hierarchy via /init-deep
Updated root + 14 core subdirectory AGENTS.md files to reflect current
state (commit 2892ca4a on dev). Added 4 new AGENTS.md files for gap
directories: hooks/comment-checker (AI slop blocker), features/claude-
code-plugin-loader (CC compat layer), features/claude-code-mcp-loader
(tier 2 MCP loader), cli/doctor (health diagnostics with 25 check files).
2026-04-18 01:21:20 +09:00
YeonGyu-Kim 2892ca4adf fix(delegate-task): align metadata with opencode core task tool
Match opencode core 'task' tool behavior for metadata consistency:

1. Model fallback: When categoryModel/task.model/resumeModel is undefined,

   fall back to parentContext.model so subagent metadata always includes

   model info. Thread parentContext into executeSyncContinuation for parity.

2. Task ID consistency: unstable-agent-task was missing taskId and

   backgroundTaskId in metadata. background_output used inconsistent

   snake_case 'task_id' vs camelCase 'taskId' elsewhere. Standardize on

   camelCase: taskId = sessionID (resume id), backgroundTaskId = bg task id.

Update text output blocks to use buildTaskMetadataBlock helper.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 17:22:14 +09:00
YeonGyu-Kim 3a656136b6 feat(delegate-task): add resolveMetadataModel helper for model fallback
Add helper that picks primary model with fallback to a secondary model

(e.g., categoryModel → parentContext.model). Enforces consistent

{providerID, modelID} shape.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-17 17:22:14 +09:00
YeonGyu-Kim f34a074f12 docs: bump claude-opus-4-6 to claude-opus-4-7 across docs, examples, and AGENTS.md
Syncs the README translations, CONTRIBUTING, docs/reference,
docs/guide, docs/examples JSONC configs, and the hierarchical
src/**/AGENTS.md files with the model version bump already landed
in the source and migration commits.
2026-04-17 14:52:19 +09:00
YeonGyu-Kim def44338ff refactor(models): bump claude-opus-4-6 to claude-opus-4-7 across fallback chains, categories, and hooks
Updates the canonical Anthropic Opus model in every fallback chain
(sisyphus, oracle, prometheus, metis, momus, visual-engineering,
ultrabrain, deep, artistry, unspecified-high), the unspecified-high
category default, the think-mode HIGH_VARIANT_MAP, the Claude Code
alias map, the claude-thinking legacy alias, the context-limit GA
regex, and event.ts fallback strings.

Widens supportsCachedAnthropicLimit to accept both claude-*-4-6 and
claude-*-4-7 so the 1M context cache still applies across the bump.

Regenerates the bundled model-capabilities snapshot from models.dev
and the model-fallback snapshot to match the new source output.
2026-04-17 14:51:52 +09:00
YeonGyu-Kim 99ffb5f585 refactor(task): drop session_id resume alias 2026-04-16 23:18:38 +09:00
YeonGyu-Kim d89e257d8a refactor(task): align continuation ids with task_id 2026-04-16 23:13:44 +09:00
YeonGyu-Kim 611f1cc932 fix(background-agent): remove descendant spawn cap 2026-04-16 23:02:27 +09:00