Commit Graph

3006 Commits

Author SHA1 Message Date
ismeth
d76c2bd8fa fix(tests): update model-requirements test for 11 builtin agents (add athena) 2026-02-24 22:17:19 +09:00
ismeth
f482b1b589 fix(athena): prometheus handoff via agent switch, not background task
Prometheus needs to interview the user interactively, so it can't run as a
background task. Updated Athena's delegation prompt:
- Atlas: still delegates via task tool (autonomous execution)
- Prometheus: outputs structured findings summary and tells the user to
  switch to Prometheus agent, which sees the conversation context and
  can ask clarifying questions directly
2026-02-24 22:17:19 +09:00
ismeth
1c1d09d858 fix(athena): prevent recursive council explosion — deny tool for bg tasks + dedup guard
Council members launched as agent='athena' got Athena's system prompt saying
'ALWAYS call athena_council first', plus the tool wasn't denied for bg athena
tasks. Each council member spawned 4 more → exponential explosion (47+ tasks).

Three fixes:
1. Deny athena_council in ATHENA_RESTRICTIONS (agent-tool-restrictions.ts)
   - Only affects background athena tasks (task-starter.ts)
   - Primary Athena (user-selected) still has access via permission field
2. Session-level dedup guard prevents re-calling while council is running
   - If Athena retries during long wait, returns 'already running'
3. Increase wait timeout from 2min to 10min (council members need time
   for real code analysis with Read/Grep/LSP)
2026-02-24 22:17:19 +09:00
ismeth
43ea49e523 fix(athena): force council-first behavior — unconditional prompt + skip keyword injection
The old prompt said 'when requiring multi-model analysis' which let Athena
decide to skip the council and do direct analysis herself. Combined with
keyword-detector injecting [search-mode] telling her to 'launch explore
agents and use Grep directly', Athena never called athena_council.

Two fixes:
1. System prompt now unconditionally requires athena_council as FIRST action
   - Explicitly prohibits Read/Grep/Glob/LSP/call_omo_agent
   - Identity is 'orchestrator, not analyst'
2. keyword-detector skips ALL injections for Athena agent
   - search/analyze/ultrawork modes conflict with council orchestration
   - Same pattern as isPlannerAgent() skip for Prometheus
2026-02-24 22:17:19 +09:00
ismeth
b663c464bc feat(06-01): direct athena prompt to athena_council
- replace manual council fan-out guidance with athena_council execution flow

- enforce athena_council-only constraint before confirmation-gated delegation
2026-02-24 22:17:19 +09:00
ismeth
4b0838b30e feat(06-01): register athena council tool in runtime registry
- export createAthenaCouncilTool from tools index

- wire athena_council with agents.athena.council config in tool registry
2026-02-24 22:17:19 +09:00
ismeth
362f446b46 feat(06-01): add athena council execution tool
- add athena_council tool scaffolding and runtime execution bridge

- poll background tasks before returning synthesized council output
2026-02-24 22:17:19 +09:00
ismeth
5ef5a5ac4d feat(05-02): add confirmation-gated Athena delegation prompt 2026-02-24 22:17:19 +09:00
ismeth
f408d44063 feat(05-02): allow Athena task tool delegation 2026-02-24 22:17:19 +09:00
ismeth
29afaf527c feat(05-01): add Atlas and Prometheus delegation prompt builders
- Build pure prompt constructors with confirmed finding context and agreement levels

- Add BDD tests for fix/planning intent, question context, and single-finding edge cases
2026-02-24 22:17:19 +09:00
ismeth
665499a40d feat(05-01): add synthesized findings presenter
- Format synthesis findings by agreement level for user-facing output

- Add BDD tests for ordering, warning flags, empty state, and recommendations
2026-02-24 22:17:19 +09:00
ismeth
b1f43e8113 test(04-01): add Athena registration and schema regressions
- verify Athena primary agents honor uiSelectedModel and override precedence

- add schema tests to lock athena acceptance in builtin and overridable names
2026-02-24 22:17:19 +09:00
ismeth
c1fab24b46 feat(04-01): register Athena in builtin agent resolution maps
- add Athena factory and prompt metadata to builtin agent sources

- define Athena fallback chain in AGENT_MODEL_REQUIREMENTS for primary resolution
2026-02-24 22:17:19 +09:00
ismeth
446901d7aa feat(04-01): add Athena primary agent factory and exports
- implement createAthenaAgent with primary-mode model behavior and prompt metadata

- export Athena factory and metadata through athena and root agent barrels
2026-02-24 22:17:19 +09:00
ismeth
95f133ff63 feat(03-01): implement synthesis contracts and formatter pipeline
- Add synthesis result contracts with agreement, provenance, and Athena assessment fields\n- Add synthesis prompt builder and council-response formatter with failure-aware provenance output
2026-02-24 22:16:45 +09:00
ismeth
d4e20b9311 test(03-01): add failing tests for synthesis formatter
- Cover completed, partial failure, total failure, and custom member naming scenarios\n- Assert provenance fields and response/error rendering requirements
2026-02-24 22:16:45 +09:00
ismeth
0b89017add feat(02-02): add council orchestrator and result collector
- Implement executeCouncil with parallel member launch and partial-failure tolerance

- Add result collection mapping and wire Athena exports with read-only athena tool restrictions
2026-02-24 22:16:45 +09:00
ismeth
4f9858e7b3 test(02-02): add failing tests for council orchestrator
- Add BDD coverage for parallel launch, partial failures, and invalid model handling

- Verify shared council prompt/model parsing inputs and per-member passthrough fields
2026-02-24 22:16:45 +09:00
ismeth
47c6bd9de9 feat(02-01): add athena council execution primitives
- Add council execution result and member response types for orchestration
- Implement provider/model parser for BackgroundManager-compatible model input
- Add shared council prompt builder and export new athena modules
2026-02-24 22:16:45 +09:00
ismeth
e130fb7ad4 test(02-01): add failing tests for athena model parser
- Cover standard provider/model strings for supported council members
- Validate edge case handling for model IDs with extra slashes
- Assert null output for malformed parser inputs
2026-02-24 22:16:45 +09:00
ismeth
1aeecf3029 feat(01-02): wire athena overrides into config validation
- add AthenaOverrideConfigSchema so athena supports council plus standard override fields

- export athena schema/contracts and add root config tests for valid and invalid athena overrides

- switch schema generation to zod v4 toJSONSchema and regenerate JSON schema with athena council structure
2026-02-24 22:16:45 +09:00
ismeth
b0284903fb feat(01-02): add athena to agent name contracts
- add athena to built-in and overridable agent name schemas

- extend BuiltinAgentName with athena for config-level recognition

- make builtin agent source maps partial until athena runtime registration lands
2026-02-24 22:16:22 +09:00
ismeth
87e47d74e8 feat(01-01): add Athena council type and schema contracts
- Add Athena council config interfaces and execution status types

- Add standalone Zod schemas for council member, council, and top-level Athena config

- Enforce 2-member minimum and bounded optional temperature validation
2026-02-24 22:16:22 +09:00
ismeth
6d10e77afd test(01-01): add failing tests for athena council schemas
- Add BDD coverage for valid and invalid Athena council configs

- Include inference and optional-field behavior assertions for CouncilMemberSchema

- Keep RED phase failing until schema implementation is added
2026-02-24 22:16:22 +09:00
github-actions[bot]
55b9ad60d8 release: v3.8.5 v3.8.5 2026-02-24 09:45:36 +00:00
YeonGyu-Kim
e997e0071c Merge pull request #2088 from minpeter/feat/hashline-edit-error-hints
fix(hashline-edit): improve error messages for invalid LINE#ID references
2026-02-24 18:36:04 +09:00
YeonGyu-Kim
b8257dc59c fix(hashline-edit): tolerate >>> prefix and spaces around # in line refs 2026-02-24 18:21:05 +09:00
YeonGyu-Kim
365d863e3a fix(hashline-edit): use instanceof for hash mismatch error detection 2026-02-24 18:21:05 +09:00
YeonGyu-Kim
1785313f3b fix(hashline-read-enhancer): skip hashifying OpenCode-truncated lines 2026-02-24 18:21:05 +09:00
YeonGyu-Kim
ac962d62ab fix(hashline-edit): add same-line operation precedence ordering 2026-02-24 18:21:05 +09:00
YeonGyu-Kim
d61c0f8cb5 fix(hashline-read-enhancer): guard against overwriting error output with success message 2026-02-24 17:52:04 +09:00
YeonGyu-Kim
a567cd0d68 fix(hashline-edit): address Oracle review feedback
- Extract WRITE_SUCCESS_MARKER constant to couple guard and output string
- Remove double blank line after parseLineRefWithHint
- Add comment clarifying normalized equals ref.trim() in error paths
2026-02-24 17:41:30 +09:00
YeonGyu-Kim
55ad4297d4 fix(hashline-edit): widen non-numeric prefix detection and remove duplicate try-catch
- Replace regex /^([A-Za-z_]+)#.../ with indexOf-based prefix check to catch
  line-ref#VK and line.ref#VK style inputs that were previously giving generic errors
- Extract parseLineRefWithHint helper to eliminate duplicated try-catch in
  validateLineRef and validateLineRefs
- Restore idempotency guard in appendWriteHashlineOutput using new output format
- Add tests for LINE42 extraction, line-ref hint, line.ref hint, and guard behavior

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-24 17:32:44 +09:00
minpeter
c6a69899d8 fix(hashline-read-enhancer): simplify write tool output to line count summary
Replace full hashlined file content in write tool response with a simple
'File written successfully. N lines written.' summary to reduce context
bloat.
2026-02-24 16:00:23 +09:00
minpeter
2aeb96c3f6 fix(hashline-edit): improve error messages for invalid LINE#ID references
- Detect non-numeric prefixes (e.g., "LINE#HK", "POS#VK") and explain
  that the prefix must be an actual line number, not literal text
- Add suggestLineForHash() that reverse-looks up a hash in file lines
  to suggest the correct reference (e.g., Did you mean "1#HK"?)
- Unify error message format from "LINE#ID" to "{line_number}#{hash_id}"
  matching the tool description convention
- Add 3 tests covering non-numeric prefix detection and hash suggestion
2026-02-24 16:00:23 +09:00
YeonGyu-Kim
5fd65f2935 Merge pull request #2086 from code-yeongyu/refactor/hashline-legacy-cleanup
refactor(hashline-edit): clean up legacy code and dead exports
2026-02-24 15:44:32 +09:00
YeonGyu-Kim
b03aae57f3 fix: remove accidentally committed node_modules symlink 2026-02-24 15:39:31 +09:00
YeonGyu-Kim
8c3a0ca2fe refactor(hashline-edit): rename legacy operation names in error messages
Update error messages to match current op schema:
- insert_after → append (anchored)
- insert_before → prepend (anchored)
2026-02-24 15:33:48 +09:00
YeonGyu-Kim
9a2e0f1add refactor(hashline-edit): remove unnecessary barrel re-exports of internal primitives
applySetLine, applyReplaceLines, applyInsertAfter, applyInsertBefore
were re-exported from both edit-operations.ts and index.ts but have no
external consumers — they are only used internally within the module.
Only applyHashlineEdits (the public API) remains exported.
2026-02-24 15:33:17 +09:00
YeonGyu-Kim
d28ebd10c1 refactor(hashline-edit): remove HASHLINE_LEGACY_REF_PATTERN and legacy ref compat
Remove the old LINE:HEX (e.g. "42:ab") reference format support. All
refs now use LINE#ID format exclusively (e.g. "42#VK"). Also fixes
HASHLINE_OUTPUT_PATTERN to use | separator (was missed in PR #2079).
2026-02-24 15:32:24 +09:00
YeonGyu-Kim
fb92babee7 refactor(hashline-edit): remove dead applyInsertBetween function
This function is no longer called from edit-operations.ts after the
op/pos/end/lines schema refactor in PR #2079. Remove the function
definition and its 3 dedicated test cases.
2026-02-24 15:31:43 +09:00
YeonGyu-Kim
5d30ec80df Merge pull request #2079 from minpeter/feat/hashline-edit-op-schema
refactor(hashline-edit): align tool payload to op/pos/end/lines
2026-02-24 15:13:45 +09:00
YeonGyu-Kim
f50f3d3c37 fix(hashline-edit): clarify LINE#ID placeholder to prevent literal interpretation 2026-02-24 15:00:06 +09:00
YeonGyu-Kim
833c26ae5c sisyphus waits for oracle 2026-02-24 14:50:00 +09:00
minpeter
60cf2de16f fix(hashline-edit): detect overlapping ranges and prevent false unwrap of blank-line spans
- Add detectOverlappingRanges() to reject edits with overlapping pos..end ranges
  instead of crashing with undefined.match()
- Add bounds guard (?? "") in edit-operation-primitives for out-of-range line access
- Add null guard in leadingWhitespace() for undefined/empty input
- Fix restoreOldWrappedLines false unwrap: skip candidate spans containing
  blank/whitespace-only lines, preventing incorrect collapse of structural
  blank lines and indentation (the "애국가 bug")
- Improve tool description for range replace clarity
- Add tests: overlapping range detection, false unwrap prevention
2026-02-24 14:46:17 +09:00
minpeter
c7efe8f002 fix(hashline-edit): preserve intentional whitespace removal in autocorrect
restoreIndentForPairedReplacement() and restoreLeadingIndent() unconditionally
restored original indentation when replacement had none, preventing intentional
indentation changes (e.g. removing a tab from '\t1절' to '1절'). Skip indent
restoration when trimmed content is identical, indicating a whitespace-only edit.
2026-02-24 14:07:21 +09:00
minpeter
54b756c145 refactor(hashline): change content separator from colon to pipe
Change LINE#HASH:content format to LINE#HASH|content across the entire
codebase. The pipe separator is more visually distinct and avoids
conflicts with TypeScript colons in code content.

15 files updated: implementation, prompts, tests, and READMEs.
2026-02-24 06:01:24 +09:00
minpeter
1cb362773b fix(hashline-read-enhancer): handle inline <content> tag from updated OpenCode read tool
OpenCode updated its read tool output format — the <content> tag now shares
a line with the first content line (<content>1: content) with no newline.

The hook's exact indexOf('<content>') detection returned -1, causing all
read output to pass through unmodified (no hash anchors). This silently
disabled the entire hashline-edit workflow.

Fixes:
- Sub-bug 1: Use findIndex + startsWith instead of exact indexOf match
- Sub-bug 2: Extract inline content after <content> prefix as first line
- Sub-bug 3: Normalize open-tag line to bare tag in output (no duplicate)

Also adds backward compat for legacy <file> + 00001| pipe format.
2026-02-24 05:47:05 +09:00
minpeter
08b663df86 refactor(hashline-edit): enforce three-op edit model
Unify internal hashline edit handling around replace/append/prepend to remove legacy operation shapes. This keeps normalization, ordering, deduplication, execution, and tests aligned with the new op/pos/end/lines contract.
2026-02-24 05:06:41 +09:00
github-actions[bot]
fddd6f1306 @Firstbober has signed the CLA in code-yeongyu/oh-my-opencode#2080 2026-02-23 19:28:23 +00:00