Commit Graph

38 Commits

Author SHA1 Message Date
Codex
db715c6329 style(prompts): prettier format owner paired-room rules
Follow-up to e3c8de6: prettier --check failed on the new section
(missing blank line after the "Before accepting any proposal..."
sentence ahead of the numbered list, and the "Do not include:" header
needed a blank line before the bullets). Running prettier --write
fixes those without changing semantics.

bunx prettier --check prompts/owner-common-paired-room.md → clean.
2026-06-01 10:46:39 +09:00
Codex
e3c8de61f1 docs(prompts): require finalize message to be a self-contained answer
The user only sees the final owner message, not the owner↔reviewer
back-and-forth. Recent turns leaked meta-narrative like "리뷰어 지적
반영해서 정정합니다" / "PROCEED 확정" into user-visible replies and
sometimes omitted explicit action items, leaving the user to guess
whether anything was needed from them.

Add a "Finalize message format (self-contained answer)" section to
owner-common-paired-room.md that mandates:
  - direct answer first
  - consolidated recap (no transcript, no narrating disagreement)
  - explicit "사용자 액션 아이템" section, with "없음" when there is
    nothing for the user to do
  - no meta phrases referencing the reviewer loop

The runner reads this prompt fresh per agent spawn
(src/agent-runner-environment.ts), so the change takes effect on the
next owner turn without a service restart.
2026-06-01 10:44:34 +09:00
Codex
1509108e04 backup current stable ejclaw state 2026-05-27 10:53:31 +09:00
Eyejoker
a74ea4bad0 fix: preserve paired owner workspace branch invariant
Safely re-anchor drifted paired owner workspaces, guard owner completion handling, and tighten generated attachment temp-dir allowlisting.
2026-04-25 12:02:02 +09:00
ejclaw
cd7e35a8b0 Parse fenced EJClaw output envelopes 2026-04-25 10:14:33 +09:00
ejclaw
83b7aef494 Add structured Discord attachments 2026-04-25 09:21:47 +09:00
ejclaw
e036521054 fix: salvage EJClaw runtime hardening
- add dist freshness guard to deploy flow
- preserve message source provenance for IPC injection
- harden Codex usage fallback and workspace package manager detection
- document owner branch return protocol
2026-04-24 15:02:09 +09:00
ejclaw
afd9c7a538 Phase 0 — STEP_DONE/TASK_DONE split + owner-follow-up integration smoke 2026-04-23 13:07:20 +09:00
ejclaw
12838a8b07 review: harden readonly git checks and lint verification 2026-04-22 20:49:02 +09:00
ejclaw
b6a24ad9fb paired: carry forward latest owner final across superseded tasks 2026-04-20 08:19:31 +09:00
ejclaw
4275f4f984 prompts: anchor reviewer verification to workspace root 2026-04-12 00:31:19 +09:00
ejclaw
c984d972e1 paired: resync reviewer workspace to owner path 2026-04-11 20:12:53 +09:00
ejclaw
8f08a79369 Clarify finalize verdict semantics 2026-04-07 19:27:03 +09:00
ejclaw
4511ca5692 Clarify reviewer verification limits 2026-04-07 02:13:22 +09:00
Eyejoker
404cbd6b04 feat: support codex runner in reviewer container
- Build both agent-runner and codex-runner into container image
- Select runner path based on group.agentType at docker exec time
- Update README to role-centric overview, generic MoA references
- Add MoA reference opinions guidance to arbiter prompt
2026-04-01 04:50:05 +09:00
Eyejoker
650ed16a7b fix: strengthen arbiter ESCALATE guidance to prevent echo loops
Arbiter was repeating PROCEED when owner needed user input (e.g.,
"PR 만들까요?"), causing infinite owner↔arbiter loops. Added
specific ESCALATE triggers: user-directed questions, repeated
NEEDS_CONTEXT after prior PROCEED.
2026-03-31 06:03:11 +09:00
Eyejoker
56c85c357a fix: prevent agents from tagging user during paired review loop 2026-03-31 04:21:22 +09:00
Eyejoker
0fb7ba6b57 chore: rename MAGI to Tribunal, add gstack prompt attribution 2026-03-31 01:54:22 +09:00
Eyejoker
cb79450572 fix: add arbiter verdict compliance to owner and reviewer prompts 2026-03-30 22:28:48 +09:00
Eyejoker
a043f2b79a feat: implement MAGI 3-agent arbiter system for deadlock resolution
Introduces a third agent role (arbiter) that is summoned on-demand
when owner and reviewer reach a deadlock (same verdict 3+ rounds).

Architecture:
- 3 Discord bots: owner (codex), reviewer (claude), arbiter (claude/codex)
- Arbiter is NOT always-on — only invoked when deadlock detected
- Arbiter renders binding verdict: PROCEED/REVISE/RESET/ESCALATE
- Non-escalate verdicts reset round_trip_count and resume ping-pong
- Backward compatible: ARBITER_AGENT_TYPE unset = existing 2-agent mode

Changes across 13 source files + 7 test files:
- types.ts: PairedRoomRole += 'arbiter', new statuses, ArbiterVerdict type
- config.ts: ARBITER_AGENT_TYPE, ARBITER_SERVICE_ID, ARBITER_DEADLOCK_THRESHOLD
- db.ts: schema migration (arbiter columns in channel_owner + paired_tasks)
- service-routing.ts: arbiter_service_id in lease
- room-role-context.ts: arbiter role detection
- paired-execution-context.ts: deadlock->arbiter, verdict handling
- message-runtime.ts: arbiter turn routing, cursor, sender labeling
- message-agent-executor.ts: arbiter mode, failover
- agent-runner.ts + environment.ts: arbiter container mode
- platform-prompts.ts: arbiter prompt loading

New files:
- prompts/arbiter-paired-room.md: arbiter system prompt
- src/arbiter-context.ts: builds conversation context for arbiter judgment
2026-03-30 22:20:42 +09:00
Eyejoker
196c885c9e fix: clarify owner/reviewer action expectations in paired room prompts
Owner was "agreeing" with concerns instead of fixing code. Reviewer
was listing issues without directing the owner to fix them. Now:
- Reviewer: explicitly direct the owner to fix specific issues
- Owner: fix issues when flagged, don't just acknowledge
2026-03-30 20:49:02 +09:00
Eyejoker
fde29db227 fix: break DONE_WITH_CONCERNS echo loop in paired room prompts
Both agents were repeating "agreed, 3 concerns remain" without
taking action. Now DONE_WITH_CONCERNS requires listing specific
actions, and repeating the same concerns for 2+ turns triggers
BLOCKED escalation.
2026-03-30 20:41:32 +09:00
Eyejoker
760e222b54 fix: explicitly declare owner role in paired room prompt 2026-03-30 03:58:39 +09:00
Eyejoker
1031cd44dd refactor: SSOT for paired room prompts, remove 4 duplicate files
All reviewers (claude, codex-review, codex-review-failover) now use
claude-paired-room.md. All owners use owner-common-paired-room.md.

Removed: codex-paired-room.md, codex-review-paired-room.md,
codex-review-failover-paired-room.md, codex-review-platform.md

10 prompt files → 6.
2026-03-30 02:39:04 +09:00
Eyejoker
17b60cb10f fix: restore communication discipline details and stagnation pattern names
The anti-pattern guardrails ("It should work now" means run it, etc.)
and stagnation pattern names (Spinning/Oscillation/Diminishing/No progress)
are too useful to compress out — they prevent common LLM failure modes.
2026-03-30 02:33:41 +09:00
Eyejoker
691be0dc86 refactor: streamline paired room prompts and fix role separation
Prompts:
- Remove model-specific names (클코, Codex) — use owner/reviewer only
- Compress duplicated sections (communication, stagnation, consensus)
  while preserving 4 ontological questions and verdict protocol intact
- Remove verdict examples (redundant with status descriptions)
- claude-platform.md: strip SDK defaults, keep only send_message rules

Code:
- Remove reviewer paired room prompt from owner CLAUDE.md
  (was causing role confusion — owner got "You are the reviewer")
- Remove "Provide feedback or approve" from review turn prompt
  (conflicted with CLAUDE.md verdict protocol)

187 lines → 100 lines across 4 prompt files.
2026-03-30 02:31:04 +09:00
Eyejoker
88fa0858ea feat: strengthen reviewer prompts with critical review, completion status, and stagnation awareness
- Expand claude/codex-review paired-room prompts with full review structure
- Add completion status protocol (DONE/DONE_WITH_CONCERNS/BLOCKED/NEEDS_CONTEXT)
- Add stagnation detection (spinning, oscillation, diminishing returns)
- Add communication discipline (fact-based, verification-based)
- Remove <internal> tag instructions from owner platform prompt
- SSOT: all 3 reviewer prompts share the same structure
2026-03-29 22:46:09 +09:00
Eyejoker
806e5e4ff1 fix: keep codex approval wording role-based 2026-03-28 17:02:50 +09:00
Eyejoker
772fea45df refactor: share owner prompts and tighten silent output guidance 2026-03-28 07:46:13 +09:00
Eyejoker
ba9f6871b6 feat: add codex review failover and suppress output hardening 2026-03-28 05:40:38 +09:00
Eyejoker
bba19b0c0f docs: clarify Claude internal visibility rules 2026-03-25 23:43:46 +09:00
Eyejoker
8b5624731c docs: add GitHub CI watcher usage guide to platform prompts
Both Claude and Codex platform prompts now include a short
section explaining when to use structured GitHub fields
(ci_provider, ci_repo, ci_run_id) for the host-driven fast
path instead of the generic LLM-per-tick watcher.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 23:19:26 +09:00
Eyejoker
094278b08e feat: add ontology checklist, verification gate, completion status protocol, and structured stagnation escalation to paired-room prompts 2026-03-25 07:46:53 +09:00
Eyejoker
2865ba07ce feat: add communication discipline to paired-room prompts (fact-based responses, verification-based completion, 3-strike architecture review) 2026-03-25 07:37:51 +09:00
Eyejoker
5e75222754 feat: strengthen paired-room prompts with critical review, consensus gate, and assumption surfacing 2026-03-25 07:31:34 +09:00
Eyejoker
767ab20d76 Restrict Codex task scheduling to CI watchers 2026-03-20 04:09:36 +09:00
Eyejoker
a293a701f4 fix: restore regressions from discord-only refactor 2026-03-20 03:41:53 +09:00
Eyejoker
bb0628e8f4 refactor: remove legacy container and non-discord remnants 2026-03-20 01:07:46 +09:00