triflux 8.11.2 → 8.12.2

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.
Files changed (103) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/hooks/hooks.json +56 -51
  5. package/hub/pipeline/index.mjs +318 -318
  6. package/hub/routing/q-learning.mjs +2 -1
  7. package/hub/schema.sql +146 -146
  8. package/hub/team/cli/commands/kill.mjs +37 -37
  9. package/hub/team/cli/commands/start/index.mjs +3 -2
  10. package/hub/team/cli/commands/start/parse-args.mjs +5 -0
  11. package/hub/team/cli/commands/start/start-headless.mjs +2 -1
  12. package/hub/team/cli/commands/stop.mjs +31 -31
  13. package/hub/team/cli/commands/task.mjs +30 -30
  14. package/hub/team/cli/help.mjs +41 -40
  15. package/hub/team/cli/services/hub-client.mjs +208 -208
  16. package/hub/team/cli/services/native-control.mjs +118 -118
  17. package/hub/team/cli/services/runtime-mode.mjs +62 -62
  18. package/hub/team/cli/services/state-store.mjs +48 -48
  19. package/hub/team/dashboard-anchor.mjs +14 -0
  20. package/hub/team/dashboard.mjs +274 -274
  21. package/hub/team/headless.mjs +44 -19
  22. package/hub/team/native.mjs +649 -649
  23. package/hub/tools.mjs +554 -554
  24. package/hub/workers/delegator-mcp.mjs +21 -1
  25. package/package.json +1 -1
  26. package/scripts/__tests__/remote-spawn-transfer.test.mjs +117 -0
  27. package/scripts/__tests__/remote-spawn.test.mjs +78 -0
  28. package/scripts/cache-buildup.mjs +401 -0
  29. package/scripts/headless-guard.mjs +10 -3
  30. package/scripts/hub-ensure.mjs +120 -120
  31. package/scripts/lib/mcp-filter.mjs +720 -720
  32. package/scripts/lib/remote-spawn-transfer.mjs +196 -0
  33. package/scripts/mcp-check.mjs +237 -127
  34. package/scripts/mcp-gateway-ensure.mjs +6 -8
  35. package/scripts/mcp-gateway-integration-test.mjs +228 -0
  36. package/scripts/mcp-gateway-start.mjs +42 -16
  37. package/scripts/mcp-gateway-start.ps1 +17 -14
  38. package/scripts/mcp-gateway-verify.mjs +1 -1
  39. package/scripts/preflight-cache.mjs +137 -137
  40. package/scripts/remote-spawn.mjs +404 -40
  41. package/scripts/setup.mjs +18 -0
  42. package/scripts/tfx-route-worker.mjs +165 -165
  43. package/scripts/tfx-route.sh +85 -16
  44. package/scripts/token-snapshot.mjs +575 -575
  45. package/skills/tfx-analysis/SKILL.md +101 -101
  46. package/skills/tfx-autopilot/SKILL.md +112 -112
  47. package/skills/tfx-autoresearch/SKILL.md +1 -0
  48. package/skills/tfx-autoroute/SKILL.md +184 -184
  49. package/skills/tfx-codex-swarm/SKILL.md +449 -0
  50. package/skills/tfx-codex-swarm/evals/evals.json +26 -0
  51. package/skills/tfx-codex-swarm-workspace/iteration-1/benchmark.json +33 -0
  52. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/eval_metadata.json +42 -0
  53. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/grading.json +11 -0
  54. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/analysis.md +87 -0
  55. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/classification.md +35 -0
  56. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/commands.sh +275 -0
  57. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/routing.md +56 -0
  58. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/timing.json +5 -0
  59. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/grading.json +11 -0
  60. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/analysis.md +92 -0
  61. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/classification.md +71 -0
  62. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/commands.sh +264 -0
  63. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/routing.md +113 -0
  64. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/timing.json +5 -0
  65. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/eval_metadata.json +32 -0
  66. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/grading.json +9 -0
  67. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/analysis.md +96 -0
  68. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/classification.md +38 -0
  69. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/commands.sh +151 -0
  70. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/routing.md +51 -0
  71. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/timing.json +5 -0
  72. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/grading.json +9 -0
  73. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/analysis.md +127 -0
  74. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/classification.md +57 -0
  75. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/commands.sh +129 -0
  76. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/routing.md +84 -0
  77. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/timing.json +5 -0
  78. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/eval_metadata.json +27 -0
  79. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/grading.json +8 -0
  80. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/analysis.md +98 -0
  81. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/classification.md +65 -0
  82. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/commands.sh +123 -0
  83. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/routing.md +66 -0
  84. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/timing.json +5 -0
  85. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/grading.json +8 -0
  86. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/analysis.md +88 -0
  87. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/classification.md +40 -0
  88. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/commands.sh +130 -0
  89. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/routing.md +61 -0
  90. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/timing.json +5 -0
  91. package/skills/tfx-profile/SKILL.md +141 -51
  92. package/skills/tfx-qa/SKILL.md +117 -117
  93. package/skills/tfx-remote-spawn/references/hosts.json +16 -16
  94. package/skills/tfx-review/SKILL.md +51 -51
  95. package/skills/tfx-setup/SKILL.md +20 -0
  96. package/tui/gemini-profile.mjs +254 -0
  97. package/tui/setup.mjs +36 -1
  98. package/scripts/claude-logged.ps1 +0 -54
  99. package/scripts/demo-tui.mjs +0 -59
  100. package/skills/.omc/state/agent-replay-8f0e10a9-9693-4410-96f5-a6b07e8ed995.jsonl +0 -1
  101. package/skills/.omc/state/idle-notif-cooldown.json +0 -3
  102. package/skills/.omc/state/last-tool-error.json +0 -7
  103. package/skills/.omc/state/subagent-tracking.json +0 -7
@@ -0,0 +1,98 @@
1
+ # tfx-codex-swarm Execution Analysis
2
+
3
+ > Generated by: tfx-codex-swarm skill
4
+ > Date: 2026-03-30
5
+ > Request: "issue 24하고 28번 PRD만 코덱스 스폰해줘. 둘 다 xhigh로 세팅하고 ralph로 끝까지 돌려"
6
+
7
+ ## Request Parsing
8
+
9
+ | Element | Parsed Value |
10
+ |---------|-------------|
11
+ | Target PRDs | issue #24, issue #28 (explicit selection) |
12
+ | Profile override | `xhigh` -> `codex53_xhigh` for both |
13
+ | OMX skill override | `$ralph` for both ("끝까지 돌려" = run to completion) |
14
+ | Execution mode | `--full-auto` (default) |
15
+
16
+ ## Skill Workflow Trace
17
+
18
+ ### Step 1: Scan
19
+ - Scanned `.omx/plans/*.md` -- found 7 PRDs (issues 24-30)
20
+ - User specified issues 24 and 28 only -- 5 PRDs skipped
21
+
22
+ ### Step 2: Selection
23
+ - User explicitly named issue 24 and 28 -- no AskUserQuestion needed
24
+ - Bypassed interactive selection entirely
25
+
26
+ ### Step 3: Classification
27
+ - Both PRDs analyzed for content keywords
28
+ - Issue #24: keywords "추가", "변경" -> **implement**
29
+ - Issue #28: keywords "fix", "변경", "추가" -> **implement**
30
+ - Auto skill would be `$plan` -> `$autopilot` for both
31
+ - **User override: `$ralph`** -- takes precedence, no AskUserQuestion
32
+
33
+ ### Step 4: Profile Routing
34
+ - Issue #24: 73 lines, 4 files, 0 high-cost keywords -> **L (standard)**
35
+ - Issue #28: 68 lines, 3 files, 0 high-cost keywords -> **L (standard)**
36
+ - Auto profile for implement/L = `codex53_high`
37
+ - **User override: `codex53_xhigh`** -- takes precedence, no AskUserQuestion
38
+
39
+ ### Step 5: Worktree
40
+ - 2 worktrees to create: `.codex-swarm/wt-issue-24`, `.codex-swarm/wt-issue-28`
41
+ - Branch naming: `codex/issue-24`, `codex/issue-28`
42
+
43
+ ### Step 6: Prompts
44
+ - 2 prompt files generated in `.codex-swarm/prompts/`
45
+ - Each prompt includes: PRD path reference, `$ralph` skill instruction, verification steps
46
+ - PRD files copied into respective worktrees
47
+
48
+ ### Step 7: psmux + Codex
49
+ - 2 psmux sessions: `codex-swarm-24`, `codex-swarm-28`
50
+ - Codex flags: `-c 'model="gpt-5.3-codex"' -c 'model_reasoning_effort="xhigh"' --full-auto`
51
+ - Launch via `psmux send-keys` for interactive mode (OMX skill requires interactive)
52
+
53
+ ### Step 8: WT Attach
54
+ - First session opens new WT window
55
+ - Second session attaches as tab in same window
56
+ - Fallback: direct `wt.exe` command included
57
+
58
+ ## Override Impact Analysis
59
+
60
+ ### Profile override: codex53_high -> codex53_xhigh
61
+
62
+ | Metric | codex53_high | codex53_xhigh | Delta |
63
+ |--------|-------------|---------------|-------|
64
+ | Model | gpt-5.3-codex | gpt-5.3-codex | same |
65
+ | Reasoning effort | high | xhigh | +1 tier |
66
+ | Expected token cost | ~1x | ~1.5-2x | higher |
67
+ | Expected quality | standard | maximum | better for complex tasks |
68
+
69
+ The override is reasonable: both PRDs involve non-trivial implementation work across multiple files with edge-case handling (path normalization, cross-shell quoting for #24; guard decision matrix testing for #28). The `xhigh` reasoning effort gives the model more room to handle these nuances correctly.
70
+
71
+ ### Skill override: $autopilot -> $ralph
72
+
73
+ | Aspect | $autopilot | $ralph |
74
+ |--------|-----------|--------|
75
+ | Planning | yes | yes |
76
+ | Execution | single pass | iterative until completion |
77
+ | Verification | basic | full loop |
78
+ | Recovery | manual | automatic retry |
79
+
80
+ The override is well-suited: `$ralph` ("끝까지 돌려") ensures each session runs its implementation to completion with verification loops, rather than stopping after a single autopilot pass. For issues that have clear acceptance criteria (both PRDs do), this maximizes the probability of a fully-resolved branch.
81
+
82
+ ## Resource Summary
83
+
84
+ | Resource | Count |
85
+ |----------|-------|
86
+ | Worktrees | 2 |
87
+ | psmux sessions | 2 |
88
+ | WT tabs | 2 (1 window) |
89
+ | Codex instances | 2 (parallel) |
90
+ | Profile | codex53_xhigh x2 |
91
+ | Branches | `codex/issue-24`, `codex/issue-28` |
92
+
93
+ ## Post-Spawn Actions (Step 10)
94
+
95
+ After both sessions complete, the user can:
96
+ 1. **Status check**: `psmux capture-pane --session "codex-swarm-{24,28}" --lines 5`
97
+ 2. **Merge results**: `git merge codex/issue-24 && git merge codex/issue-28`
98
+ 3. **Cleanup**: `psmux kill-session --name "codex-swarm-*" && git worktree prune && rm -rf .codex-swarm/`
@@ -0,0 +1,65 @@
1
+ # tfx-codex-swarm Classification Report
2
+
3
+ > Generated by: tfx-codex-swarm skill (Step 3)
4
+ > Date: 2026-03-30
5
+ > Mode: Selective spawn (user-specified issues 24, 28)
6
+ > User overrides: OMX skill = $ralph (both), Profile = xhigh (both)
7
+
8
+ ## Step 1: Scan Results
9
+
10
+ Scan path: `.omx/plans/*.md`
11
+
12
+ | # | PRD File | Found |
13
+ |---|----------|-------|
14
+ | 24 | `.omx/plans/prd-issue-24-remote-spawn-file-transfer.md` | YES |
15
+ | 28 | `.omx/plans/prd-issue-28-headless-guard-spawn-deadlock.md` | YES |
16
+
17
+ Other PRDs in `.omx/plans/` (skipped per user selection):
18
+ - prd-issue-25-remote-spawn-resize-blank-screen.md
19
+ - prd-issue-26-remote-spawn-session-cleanup.md
20
+ - prd-issue-27-hud-dashboard-anchor.md
21
+ - prd-issue-29-headless-cwd-propagation.md
22
+ - prd-issue-30-remote-spawn-terminal-minimize.md
23
+
24
+ ## Step 2: Task Selection
25
+
26
+ User explicitly specified: **issue 24, issue 28** -- skip AskUserQuestion, proceed to Step 3.
27
+
28
+ ## Step 3: Classification & OMX Skill Mapping
29
+
30
+ ### Issue #24 — remote-spawn-file-transfer
31
+
32
+ | Signal | Value |
33
+ |--------|-------|
34
+ | Content keywords | "추가" (file-transfer phase), "변경" (rewrite prompt), "implement" (transfer phase) |
35
+ | Auto-classified type | **implement** (구현) |
36
+ | Default OMX skill | `$plan` -> `$autopilot` |
37
+ | **User override** | **`$ralph`** (끝까지 돌려) |
38
+
39
+ Key implementation tasks:
40
+ - Add file-transfer phase to `scripts/remote-spawn.mjs`
41
+ - Implement remote staging directory + prompt path rewriting
42
+ - Add size/existence checks aligned with `MAX_HANDOFF_BYTES`
43
+ - Fail-fast on missing files before SSH launch
44
+
45
+ ### Issue #28 — headless-guard-spawn-deadlock
46
+
47
+ | Signal | Value |
48
+ |--------|-------|
49
+ | Content keywords | "fix" (deadlock perception), "변경" (denial message), "추가" (regression tests) |
50
+ | Auto-classified type | **implement** (구현) |
51
+ | Default OMX skill | `$plan` -> `$autopilot` |
52
+ | **User override** | **`$ralph`** (끝까지 돌려) |
53
+
54
+ Key implementation tasks:
55
+ - Rewrite guard denial message to be action-oriented
56
+ - Surface bypass (`TFX_ALLOW_DIRECT_CLI=1`) and approved headless command in response
57
+ - Add regression tests for deny/bypass/nested-session matrix
58
+ - Keep guard intent intact (no removal)
59
+
60
+ ## Classification Summary
61
+
62
+ | # | Task | Auto Type | Auto Skill | **Override Skill** |
63
+ |---|------|-----------|------------|-------------------|
64
+ | 24 | remote-spawn-file-transfer | implement | `$plan` -> `$autopilot` | **`$ralph`** |
65
+ | 28 | headless-guard-spawn-deadlock | implement | `$plan` -> `$autopilot` | **`$ralph`** |
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env bash
2
+ # =============================================================================
3
+ # tfx-codex-swarm: Selective Spawn Commands
4
+ # Generated by: tfx-codex-swarm skill (Steps 5-8)
5
+ # Date: 2026-03-30
6
+ # Target issues: #24 (remote-spawn-file-transfer), #28 (headless-guard-spawn-deadlock)
7
+ # Profile: codex53_xhigh (user override)
8
+ # OMX Skill: $ralph (user override)
9
+ # =============================================================================
10
+ # WARNING: This script is a DRY RUN artifact. Do NOT execute directly.
11
+ # =============================================================================
12
+
13
+ PROJECT_ROOT="C:/Users/SSAFY/Desktop/Projects/cli/triflux"
14
+ BASH_EXE='C:\Program Files\Git\bin\bash.exe'
15
+
16
+ # ─────────────────────────────────────────────────────────────────────────────
17
+ # Step 5: Worktree Creation
18
+ # ─────────────────────────────────────────────────────────────────────────────
19
+
20
+ # Issue #24 — worktree
21
+ git worktree add "${PROJECT_ROOT}/.codex-swarm/wt-issue-24" -b codex/issue-24 2>/dev/null || \
22
+ git worktree add "${PROJECT_ROOT}/.codex-swarm/wt-issue-24" codex/issue-24
23
+
24
+ # Issue #28 — worktree
25
+ git worktree add "${PROJECT_ROOT}/.codex-swarm/wt-issue-28" -b codex/issue-28 2>/dev/null || \
26
+ git worktree add "${PROJECT_ROOT}/.codex-swarm/wt-issue-28" codex/issue-28
27
+
28
+ # ─────────────────────────────────────────────────────────────────────────────
29
+ # Step 6: Prompt Generation
30
+ # ─────────────────────────────────────────────────────────────────────────────
31
+
32
+ mkdir -p "${PROJECT_ROOT}/.codex-swarm/prompts"
33
+
34
+ # --- Prompt for Issue #24 ---
35
+ cat > "${PROJECT_ROOT}/.codex-swarm/prompts/prompt-24.md" << 'PROMPT_24'
36
+ triflux 프로젝트의 태스크를 구현해야 합니다.
37
+
38
+ 태스크 파일을 먼저 읽으세요: .omx/plans/prd-issue-24-remote-spawn-file-transfer.md
39
+
40
+ 작업 순서:
41
+ 1. 태스크 파일을 읽고 요구사항을 파악하세요
42
+ 2. $ralph 스킬을 사용하세요 — 계획 수립 후 완료까지 반복 실행합니다. 작업이 완전히 끝날 때까지 멈추지 마세요.
43
+ 3. 모든 acceptance criteria를 충족하는지 검증하세요
44
+ 4. npm test로 기존 테스트가 깨지지 않았는지 확인하세요
45
+
46
+ 프로젝트 정보:
47
+ - triflux: Claude Code용 멀티모델 CLI 오케스트레이터
48
+ - 언어: JavaScript/ESM (Node.js), 테스트: npm test
49
+ PROMPT_24
50
+
51
+ # Copy PRD into worktree
52
+ cp "${PROJECT_ROOT}/.omx/plans/prd-issue-24-remote-spawn-file-transfer.md" \
53
+ "${PROJECT_ROOT}/.codex-swarm/wt-issue-24/.omx/plans/prd-issue-24-remote-spawn-file-transfer.md"
54
+
55
+ # --- Prompt for Issue #28 ---
56
+ cat > "${PROJECT_ROOT}/.codex-swarm/prompts/prompt-28.md" << 'PROMPT_28'
57
+ triflux 프로젝트의 태스크를 구현해야 합니다.
58
+
59
+ 태스크 파일을 먼저 읽으세요: .omx/plans/prd-issue-28-headless-guard-spawn-deadlock.md
60
+
61
+ 작업 순서:
62
+ 1. 태스크 파일을 읽고 요구사항을 파악하세요
63
+ 2. $ralph 스킬을 사용하세요 — 계획 수립 후 완료까지 반복 실행합니다. 작업이 완전히 끝날 때까지 멈추지 마세요.
64
+ 3. 모든 acceptance criteria를 충족하는지 검증하세요
65
+ 4. npm test로 기존 테스트가 깨지지 않았는지 확인하세요
66
+
67
+ 프로젝트 정보:
68
+ - triflux: Claude Code용 멀티모델 CLI 오케스트레이터
69
+ - 언어: JavaScript/ESM (Node.js), 테스트: npm test
70
+ PROMPT_28
71
+
72
+ # Copy PRD into worktree
73
+ cp "${PROJECT_ROOT}/.omx/plans/prd-issue-28-headless-guard-spawn-deadlock.md" \
74
+ "${PROJECT_ROOT}/.codex-swarm/wt-issue-28/.omx/plans/prd-issue-28-headless-guard-spawn-deadlock.md"
75
+
76
+ # ─────────────────────────────────────────────────────────────────────────────
77
+ # Step 7: psmux Session Creation + Codex Launch
78
+ # ─────────────────────────────────────────────────────────────────────────────
79
+
80
+ # Common Codex flags (codex53_xhigh profile)
81
+ PROFILE_FLAGS="-c 'model=\"gpt-5.3-codex\"' -c 'model_reasoning_effort=\"xhigh\"'"
82
+
83
+ # --- Issue #24 session ---
84
+ psmux new-session \
85
+ --name "codex-swarm-24" \
86
+ --dir "${PROJECT_ROOT}/.codex-swarm/wt-issue-24"
87
+
88
+ psmux send-keys --target "codex-swarm-24:0" \
89
+ "codex -c 'model=\"gpt-5.3-codex\"' -c 'model_reasoning_effort=\"xhigh\"' --full-auto \"\$(cat ${PROJECT_ROOT}/.codex-swarm/prompts/prompt-24.md)\"" Enter
90
+
91
+ # --- Issue #28 session ---
92
+ psmux new-session \
93
+ --name "codex-swarm-28" \
94
+ --dir "${PROJECT_ROOT}/.codex-swarm/wt-issue-28"
95
+
96
+ psmux send-keys --target "codex-swarm-28:0" \
97
+ "codex -c 'model=\"gpt-5.3-codex\"' -c 'model_reasoning_effort=\"xhigh\"' --full-auto \"\$(cat ${PROJECT_ROOT}/.codex-swarm/prompts/prompt-28.md)\"" Enter
98
+
99
+ # ─────────────────────────────────────────────────────────────────────────────
100
+ # Step 8: WT Tab Batch Attach
101
+ # ─────────────────────────────────────────────────────────────────────────────
102
+
103
+ # Primary method: psmux attach
104
+ psmux attach --session "codex-swarm-24" --wt-new-window
105
+ psmux attach --session "codex-swarm-28" --wt-tab
106
+
107
+ # Fallback: wt.exe direct (if psmux attach unavailable)
108
+ # wt.exe -w new \
109
+ # --title "issue-24: file-transfer" \
110
+ # -d "${PROJECT_ROOT}/.codex-swarm/wt-issue-24" \
111
+ # "$BASH_EXE" -c "psmux attach codex-swarm-24" \; \
112
+ # new-tab \
113
+ # --title "issue-28: guard-deadlock" \
114
+ # -d "${PROJECT_ROOT}/.codex-swarm/wt-issue-28" \
115
+ # "$BASH_EXE" -c "psmux attach codex-swarm-28"
116
+
117
+ # ─────────────────────────────────────────────────────────────────────────────
118
+ # Status Report (Step 9 — would be displayed after spawn)
119
+ # ─────────────────────────────────────────────────────────────────────────────
120
+ # | # | Task | Type | OMX Skill | Profile | Worktree | Session |
121
+ # |---|----------------------------|----------|-----------|----------------|---------------|-----------------|
122
+ # | 24 | remote-spawn-file-transfer | implement | $ralph | codex53_xhigh | wt-issue-24 | codex-swarm-24 |
123
+ # | 28 | headless-guard-deadlock | implement | $ralph | codex53_xhigh | wt-issue-28 | codex-swarm-28 |
@@ -0,0 +1,66 @@
1
+ # tfx-codex-swarm Routing Report
2
+
3
+ > Generated by: tfx-codex-swarm skill (Step 4)
4
+ > Date: 2026-03-30
5
+
6
+ ## Step 4-1: Task Size Estimation
7
+
8
+ ### Issue #24 — remote-spawn-file-transfer
9
+
10
+ | Signal | Measurement | Value |
11
+ |--------|-------------|-------|
12
+ | PRD length | `wc -l` | **73 lines** |
13
+ | Affected files | paths mentioned in PRD | **4 files** (`scripts/remote-spawn.mjs`, handoff files, PRD paths, SSH launcher) |
14
+ | High-cost keywords | architecture/migration/refactoring | **0** (none) |
15
+ | Dependency depth | cross-issue/PRD references | **0** (self-contained) |
16
+
17
+ **Size classification: L (standard)** -- 40-80 lines, 3-5 files, 0-1 high-cost keywords
18
+
19
+ ### Issue #28 — headless-guard-spawn-deadlock
20
+
21
+ | Signal | Measurement | Value |
22
+ |--------|-------------|-------|
23
+ | PRD length | `wc -l` | **68 lines** |
24
+ | Affected files | paths mentioned in PRD | **3 files** (`scripts/headless-guard.mjs`, `hub/team/psmux.mjs`, test files) |
25
+ | High-cost keywords | architecture/migration/refactoring | **0** (none) |
26
+ | Dependency depth | cross-issue/PRD references | **0** (self-contained) |
27
+
28
+ **Size classification: L (standard)** -- 40-80 lines, 3-5 files, 0-1 high-cost keywords
29
+
30
+ ## Step 4-2: Profile Routing
31
+
32
+ ### Auto-routing (what the harness would choose)
33
+
34
+ | Type \ Size | XL | **L** | M | S |
35
+ |-------------|-----|-----|-----|-----|
36
+ | **implement** | codex53_xhigh | **codex53_high** | codex53_med | codex53_low |
37
+
38
+ Both issues: type=implement, size=L --> auto-route = `codex53_high`
39
+
40
+ ### User override
41
+
42
+ User said: "둘 다 xhigh로 세팅하고" --> override both to `codex53_xhigh`
43
+
44
+ ## Step 4-3: Final Routing Table
45
+
46
+ | # | Task | Size | Type | Auto Profile | **Final Profile** |
47
+ |---|------|------|------|-------------|-------------------|
48
+ | 24 | remote-spawn-file-transfer | L | implement | codex53_high | **codex53_xhigh** |
49
+ | 28 | headless-guard-spawn-deadlock | L | implement | codex53_high | **codex53_xhigh** |
50
+
51
+ ## Profile -> Codex CLI Flags
52
+
53
+ ```
54
+ codex53_xhigh -> -c 'model="gpt-5.3-codex"' -c 'model_reasoning_effort="xhigh"'
55
+ ```
56
+
57
+ Both sessions use identical flags.
58
+
59
+ ## Step 4-4: Other Settings
60
+
61
+ | Setting | Value | Note |
62
+ |---------|-------|------|
63
+ | Execution mode | `--full-auto` | Sandbox auto-approve (YOLO) |
64
+ | Worktree | enabled | Per-session independent worktree |
65
+ | psmux | enabled | Session management |
66
+ | OMX skill | `$ralph` | User override (both sessions) |
@@ -0,0 +1,5 @@
1
+ {
2
+ "total_tokens": 29085,
3
+ "duration_ms": 163067,
4
+ "total_duration_seconds": 163.1
5
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "expectations": [
3
+ {"text": "only-2-selected", "passed": true, "evidence": "24, 28만 선택됨"},
4
+ {"text": "xhigh-override", "passed": true, "evidence": "xhigh 적용, config.toml 프로파일 참조"},
5
+ {"text": "ralph-skill", "passed": true, "evidence": "$ralph 참조 존재"},
6
+ {"text": "worktree-2-only", "passed": true, "evidence": "2개 worktree (create-or-reuse 패턴)"}
7
+ ]
8
+ }
@@ -0,0 +1,88 @@
1
+ # Analysis: Selective Spawn without SKILL.md Guidance
2
+
3
+ > Generated: 2026-03-30
4
+ > Eval: `selective-spawn-with-override` (eval_id: 2)
5
+ > Variant: `without_skill`
6
+
7
+ ## Task Summary
8
+
9
+ **User request**: "issue 24하고 28번 PRD만 코덱스 스폰해줘. 둘 다 xhigh로 세팅하고 ralph로 끝까지 돌려"
10
+
11
+ **Decomposed requirements**:
12
+ 1. Select only issues 24 and 28 from the 7 available PRDs
13
+ 2. Override effort level to `xhigh` for both sessions
14
+ 3. Use `$ralph` workflow (persist until complete) instead of default `$autopilot`
15
+ 4. Spawn as Codex sessions (not Claude Code)
16
+
17
+ ## Approach Without Skill Guidance
18
+
19
+ Without the `tfx-codex-swarm` SKILL.md, the agent must rely on:
20
+
21
+ ### Knowledge Sources Used
22
+
23
+ | Source | What it provided |
24
+ |--------|-----------------|
25
+ | `.omc/codex-spawn/codex-prd-launcher.sh` | Existing launcher pattern: `codex exec --full-auto` with `-c` flag config overrides |
26
+ | `.omc/codex-spawn/spawn-all.sh` | WT tab spawning pattern using `wt.exe -w new` with `new-tab` chaining |
27
+ | `.omc/codex-spawn/prompt-{24,28}.md` | Existing prompt templates for these specific issues |
28
+ | `~/.codex/config.toml` | Available profiles including `codex53_xhigh` with exact model/effort settings |
29
+ | `.omx/plans/prd-issue-{24,28}.md` | Full PRD content for classification and prompt generation |
30
+ | `tui/codex-profile.mjs` | Effort levels: `low`, `medium`, `high`, `xhigh` |
31
+ | `hub/workers/codex-mcp.mjs` | Codex MCP API surface: model, profile, approvalPolicy, config options |
32
+ | `skills/tfx-ralph/SKILL.md` | Ralph = tfx-persist alias, Tri-Verified Persistence Loop, tier degradation |
33
+ | `.omx/tmux-hook.json` | OMX tmux injection supports ralph/ultrawork/team modes |
34
+
35
+ ### What the Skill Would Have Provided
36
+
37
+ The `tfx-codex-swarm` SKILL.md provides a structured 10-step workflow:
38
+
39
+ 1. **Task file scan** with defined search paths (`.omx/plans/*.md`, `.omc/plans/*.md`, `docs/prd/*.md`)
40
+ 2. **AskUserQuestion-based selection** UI with "전체/선택/최근" options
41
+ 3. **Automatic type classification** table (implement/investigate/refactor)
42
+ 4. **Size-based profile routing** with explicit thresholds (XL/L/M/S)
43
+ 5. **Profile-to-flag mapping** table
44
+ 6. **Worktree naming convention** (`.codex-swarm/wt-issue-{N}`)
45
+ 7. **Prompt template** structure
46
+ 8. **psmux session + Codex launch** commands
47
+ 9. **WT tab attach** with psmux-first and wt.exe fallback
48
+ 10. **Post-spawn management** (status, merge, cleanup)
49
+
50
+ ### Decisions Made Without Skill
51
+
52
+ | Decision | Without Skill | With Skill |
53
+ |----------|--------------|------------|
54
+ | PRD location | Found via `Glob **/*prd*` | Defined scan paths in Step 1 |
55
+ | Selection method | Direct from user request ("24하고 28번") | AskUserQuestion UI (Step 2) |
56
+ | Classification | Manual PRD content analysis | Keyword table lookup (Step 3) |
57
+ | Profile routing | Matched user "xhigh" to `codex53_xhigh` in config.toml | Size assessment -> routing table -> override flow (Step 4) |
58
+ | Worktree path | Copied `.codex-swarm/wt-issue-{N}` from existing patterns | Defined in Step 5 |
59
+ | Prompt structure | Based on existing `.omc/codex-spawn/prompt-{24,28}.md` | Template in Step 6 |
60
+ | Execution mode | `codex` interactive (not `codex exec`) for OMX skill compat | Explicit in Step 7 note |
61
+ | WT attach | psmux attach + wt.exe fallback from spawn-all.sh | Defined in Step 8 |
62
+
63
+ ## Critical Difference: `codex` vs `codex exec`
64
+
65
+ The existing `codex-prd-launcher.sh` uses `codex exec --full-auto` (non-interactive). However, this is **incompatible with OMX skills** like `$ralph`. The SKILL.md Step 7 explicitly notes:
66
+
67
+ > "Codex 대화식 모드 실행 -- OMX 스킬($plan, $autopilot 등)이 동작하려면 대화식 필수"
68
+ > "codex exec(비대화식)에서는 OMX $skill이 트리거되지 않으므로 반드시 대화식으로 실행"
69
+
70
+ Without skill guidance, an agent might incorrectly use `codex exec --full-auto` (copying the launcher pattern), which would silently prevent `$ralph` from activating. The without_skill variant here correctly uses interactive `codex` (without `exec`) because the `$ralph` requirement was analyzed against the tfx-ralph SKILL.md.
71
+
72
+ ## Assertion Compliance
73
+
74
+ Per `eval_metadata.json`:
75
+
76
+ | Assertion | Status | Evidence |
77
+ |-----------|--------|----------|
78
+ | `only-2-selected` | PASS | commands.sh contains only issue-24 and issue-28. No references to 25, 26, 27, 29, 30. Exactly 2 `git worktree add`, 2 `psmux new-session`, 2 `psmux send-keys` |
79
+ | `xhigh-override` | PASS | routing.md shows `codex53_xhigh` for both. commands.sh uses `model_reasoning_effort="xhigh"` in both send-keys commands |
80
+ | `ralph-skill` | PASS | Prompts contain "$ralph 스킬로 완료될 때까지 반복 실행하세요". classification.md shows `$ralph (user override)` |
81
+ | `worktree-2-only` | PASS | commands.sh has exactly 2 `git worktree add` commands (wt-issue-24, wt-issue-28) |
82
+
83
+ ## Risk Notes
84
+
85
+ 1. **Interactive mode requirement**: Without SKILL.md, an agent could default to `codex exec` from the existing launcher, breaking `$ralph` activation
86
+ 2. **Profile existence**: `codex53_xhigh` must exist in `~/.codex/config.toml` -- verified present
87
+ 3. **OMX tmux hook**: `.omx/tmux-hook.json` confirms ralph is in `allowed_modes`, so tmux injection will function
88
+ 4. **Tier degradation**: `$ralph` (= tfx-persist) has a 3-tier degradation chain. If psmux/Hub/Codex are unavailable, it falls back to Tier 3 (Claude Agent only). The commands assume Tier 1 (full stack available)
@@ -0,0 +1,40 @@
1
+ # Codex Swarm - PRD Classification (Selective: Issue 24, 28)
2
+
3
+ > Generated: 2026-03-30
4
+ > Source: `.omx/plans/prd-issue-{24,28}.md` (2 PRDs selected from 7 total)
5
+ > User directive: "issue 24하고 28번 PRD만 코덱스 스폰해줘. 둘 다 xhigh로 세팅하고 ralph로 끝까지 돌려"
6
+ > Mode: without_skill (no SKILL.md guidance)
7
+
8
+ ## Selection Filter
9
+
10
+ User explicitly requested **only issue 24 and 28**. Issues 25, 26, 27, 29, 30 are excluded.
11
+
12
+ ## Classification
13
+
14
+ | # | PRD File | Type | Keywords Found | OMX Skill |
15
+ |---|----------|------|----------------|-----------|
16
+ | 24 | `prd-issue-24-remote-spawn-file-transfer.md` | **implement** | "추가", "변경", "전송" | `$ralph` (user override) |
17
+ | 28 | `prd-issue-28-headless-guard-spawn-deadlock.md` | **implement** | "변경", "개선", "추가" | `$ralph` (user override) |
18
+
19
+ ## Classification Logic (without SKILL.md)
20
+
21
+ Without skill guidance, classification is inferred from PRD content analysis:
22
+
23
+ - **Issue 24**: PRD describes adding a file-transfer phase to `remote-spawn.mjs`. Contains action words "추가" (add), "변경" (change). Clear implementation task.
24
+ - **Issue 28**: PRD describes improving `headless-guard.mjs` denial messages and adding regression tests. Contains "변경" (change), "개선" (improve), "추가" (add). Clear implementation task.
25
+
26
+ Both would auto-classify as **implement** under normal routing, which maps to `$plan -> $autopilot`. However, the user explicitly requested `$ralph` (persist until done), overriding the default skill assignment for both tasks.
27
+
28
+ ## User Override Summary
29
+
30
+ | Override | Default | Applied |
31
+ |----------|---------|---------|
32
+ | Task selection | all 7 PRDs | **2 PRDs only** (24, 28) |
33
+ | OMX skill | `$plan -> $autopilot` | **`$ralph`** (끝까지 돌려) |
34
+ | Profile/effort | auto-routed per size | **xhigh forced** (둘 다 xhigh) |
35
+
36
+ ## Summary
37
+
38
+ - **2 implement** tasks selected: issues 24, 28
39
+ - **5 excluded**: issues 25, 26, 27, 29, 30
40
+ - **Skill override**: `$ralph` for both (user: "ralph로 끝까지 돌려")
@@ -0,0 +1,130 @@
1
+ #!/bin/bash
2
+ # commands.sh — Codex selective spawn: Issue 24, 28 only
3
+ # Profile: codex53_xhigh | Skill: $ralph | Mode: full-auto
4
+ # Generated: 2026-03-30 (without_skill variant)
5
+ #
6
+ # DO NOT EXECUTE DIRECTLY — this is a generated reference.
7
+ # The commands below show what WOULD be executed.
8
+ set -euo pipefail
9
+
10
+ PROJ_DIR="/c/Users/SSAFY/Desktop/Projects/cli/triflux"
11
+ BASH_EXE='C:\Program Files\Git\bin\bash.exe'
12
+ SWARM_DIR="$PROJ_DIR/.codex-swarm"
13
+
14
+ # ============================================================
15
+ # Step 1: Worktree Creation (2 worktrees only)
16
+ # ============================================================
17
+
18
+ cd "$PROJ_DIR"
19
+
20
+ git worktree add "$SWARM_DIR/wt-issue-24" -b codex/issue-24 2>/dev/null || \
21
+ git worktree add "$SWARM_DIR/wt-issue-24" codex/issue-24
22
+
23
+ git worktree add "$SWARM_DIR/wt-issue-28" -b codex/issue-28 2>/dev/null || \
24
+ git worktree add "$SWARM_DIR/wt-issue-28" codex/issue-28
25
+
26
+ # ============================================================
27
+ # Step 2: Copy PRD files to worktrees
28
+ # ============================================================
29
+
30
+ mkdir -p "$SWARM_DIR/wt-issue-24/.omx/plans"
31
+ cp "$PROJ_DIR/.omx/plans/prd-issue-24-remote-spawn-file-transfer.md" \
32
+ "$SWARM_DIR/wt-issue-24/.omx/plans/"
33
+
34
+ mkdir -p "$SWARM_DIR/wt-issue-28/.omx/plans"
35
+ cp "$PROJ_DIR/.omx/plans/prd-issue-28-headless-guard-spawn-deadlock.md" \
36
+ "$SWARM_DIR/wt-issue-28/.omx/plans/"
37
+
38
+ # ============================================================
39
+ # Step 3: Generate Prompts (with $ralph skill directive)
40
+ # ============================================================
41
+
42
+ mkdir -p "$SWARM_DIR/prompts"
43
+
44
+ cat > "$SWARM_DIR/prompts/prompt-24.md" << 'PROMPT_EOF'
45
+ triflux 프로젝트의 PRD를 구현해야 합니다.
46
+
47
+ PRD 파일을 먼저 읽으세요: .omx/plans/prd-issue-24-remote-spawn-file-transfer.md
48
+
49
+ 작업 순서:
50
+ 1. PRD 파일을 읽고 요구사항을 파악하세요
51
+ 2. $ralph 스킬로 완료될 때까지 반복 실행하세요. 멈추지 마세요.
52
+ 3. 구현 후 관련 테스트를 작성하고 npm test로 검증하세요
53
+ 4. 모든 acceptance criteria를 충족할 때까지 계속하세요
54
+
55
+ 핵심 요구사항:
56
+ - remote-spawn에서 --handoff 파일과 참조된 파일을 원격 호스트로 전송
57
+ - 전송 대상은 명시적이고 경계가 명확해야 함
58
+ - MAX_HANDOFF_BYTES 및 로컬 검증 동작 유지
59
+
60
+ 프로젝트 컨텍스트:
61
+ - triflux: Claude Code용 멀티모델 CLI 오케스트레이터
62
+ - 언어: JavaScript/ESM (Node.js), 테스트: npm test
63
+ - 핵심 파일: scripts/remote-spawn.mjs
64
+ PROMPT_EOF
65
+
66
+ cat > "$SWARM_DIR/prompts/prompt-28.md" << 'PROMPT_EOF'
67
+ triflux 프로젝트의 PRD를 구현해야 합니다.
68
+
69
+ PRD 파일을 먼저 읽으세요: .omx/plans/prd-issue-28-headless-guard-spawn-deadlock.md
70
+
71
+ 작업 순서:
72
+ 1. PRD 파일을 읽고 요구사항을 파악하세요
73
+ 2. $ralph 스킬로 완료될 때까지 반복 실행하세요. 멈추지 마세요.
74
+ 3. 구현 후 관련 테스트를 작성하고 npm test로 검증하세요
75
+ 4. 모든 acceptance criteria를 충족할 때까지 계속하세요
76
+
77
+ 핵심 요구사항:
78
+ - headless-guard의 거부 메시지를 액션 지향적으로 개선
79
+ - 바이패스(TFX_ALLOW_DIRECT_CLI=1)와 승인된 headless 명령을 같은 응답에 표시
80
+ - 가드 결정 매트릭스에 대한 회귀 테스트 추가
81
+
82
+ 프로젝트 컨텍스트:
83
+ - triflux: Claude Code용 멀티모델 CLI 오케스트레이터
84
+ - 언어: JavaScript/ESM (Node.js), 테스트: npm test
85
+ - 핵심 파일: scripts/headless-guard.mjs
86
+ PROMPT_EOF
87
+
88
+ # ============================================================
89
+ # Step 4: psmux Session Creation + Codex Launch
90
+ # ============================================================
91
+
92
+ # --- Issue 24: remote-spawn file transfer ---
93
+ psmux new-session --name "codex-swarm-24" --dir "$SWARM_DIR/wt-issue-24"
94
+
95
+ psmux send-keys --target "codex-swarm-24:0" \
96
+ "codex -c 'model=\"gpt-5.3-codex\"' -c 'model_reasoning_effort=\"xhigh\"' \"\$(cat $SWARM_DIR/prompts/prompt-24.md)\"" Enter
97
+
98
+ # --- Issue 28: headless-guard spawn deadlock ---
99
+ psmux new-session --name "codex-swarm-28" --dir "$SWARM_DIR/wt-issue-28"
100
+
101
+ psmux send-keys --target "codex-swarm-28:0" \
102
+ "codex -c 'model=\"gpt-5.3-codex\"' -c 'model_reasoning_effort=\"xhigh\"' \"\$(cat $SWARM_DIR/prompts/prompt-28.md)\"" Enter
103
+
104
+ # ============================================================
105
+ # Step 5: WT Tab Attach (2 tabs in single window)
106
+ # ============================================================
107
+
108
+ # psmux attach 방식 (우선)
109
+ psmux attach --session "codex-swarm-24" --wt-new-window
110
+ psmux attach --session "codex-swarm-28" --wt-tab
111
+
112
+ # wt.exe fallback (psmux attach 불가 시)
113
+ # wt.exe -w new \
114
+ # --title 'I24-FileTransfer' -d "$SWARM_DIR/wt-issue-24" "$BASH_EXE" -c "psmux attach codex-swarm-24" \; \
115
+ # new-tab --title 'I28-GuardDeadlock' -d "$SWARM_DIR/wt-issue-28" "$BASH_EXE" -c "psmux attach codex-swarm-28"
116
+
117
+ # ============================================================
118
+ # Step 6: Status Report
119
+ # ============================================================
120
+
121
+ echo ""
122
+ echo "=== Codex Selective Spawn Complete ==="
123
+ echo ""
124
+ echo "| # | Task | Type | OMX Skill | Profile | Worktree | Session |"
125
+ echo "|---|------------------|-----------|-----------|----------------|--------------|-----------------|"
126
+ echo "| 24 | file-transfer | implement | \$ralph | codex53_xhigh | wt-issue-24 | codex-swarm-24 |"
127
+ echo "| 28 | guard-deadlock | implement | \$ralph | codex53_xhigh | wt-issue-28 | codex-swarm-28 |"
128
+ echo ""
129
+ echo "Sessions: 2 | Profile: codex53_xhigh | Skill: \$ralph | Mode: full-auto"
130
+ echo "Excluded: issues 25, 26, 27, 29, 30"