triflux 10.43.0 → 10.45.0

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 (209) hide show
  1. package/README.md +3 -1
  2. package/adapters/codex/skills/tfx-harness/SKILL.md +66 -0
  3. package/adapters/codex/skills/tfx-harness/skill.json +5 -0
  4. package/bin/tfx-live.mjs +752 -77
  5. package/bin/triflux.mjs +20 -3
  6. package/hooks/codex-session-hook.mjs +67 -1
  7. package/hooks/cto-north-star-brief.mjs +3 -16
  8. package/hooks/error-context.mjs +3 -6
  9. package/hooks/hook-manager.mjs +1 -1
  10. package/hooks/hook-registry.json +0 -11
  11. package/hooks/keyword-rules.json +147 -23
  12. package/hooks/permission-safe-allow.mjs +36 -2
  13. package/hooks/session-start-fast.mjs +50 -1
  14. package/hooks/session-start-lake.mjs +3 -16
  15. package/hub/bridge.mjs +111 -5
  16. package/hub/cli-adapter-base.mjs +11 -2
  17. package/hub/codex-adapter.mjs +3 -0
  18. package/hub/gemini-adapter.mjs +29 -11
  19. package/hub/intent.mjs +24 -32
  20. package/hub/lib/memory-store.mjs +66 -30
  21. package/hub/lib/tfx-route-args.mjs +41 -4
  22. package/hub/pipe.mjs +10 -15
  23. package/hub/reflexion.mjs +0 -57
  24. package/hub/router.mjs +474 -24
  25. package/hub/schema.sql +62 -2
  26. package/hub/server.mjs +214 -93
  27. package/hub/store.mjs +682 -37
  28. package/hub/team/backend.mjs +4 -2
  29. package/hub/team/claude-daemon-control.mjs +2 -0
  30. package/hub/team/cli/commands/start/start-headless.mjs +2 -0
  31. package/hub/team/cli/commands/start/start-mux.mjs +24 -3
  32. package/hub/team/cli/services/runtime-mode.mjs +23 -9
  33. package/hub/team/codex-review.mjs +2 -3
  34. package/hub/team/conductor.mjs +101 -24
  35. package/hub/team/cto-auto-collect.mjs +2 -6
  36. package/hub/team/cto-pull.mjs +4 -0
  37. package/hub/team/dashboard-open.mjs +1 -0
  38. package/hub/team/execution-mode.mjs +50 -4
  39. package/hub/team/headless.mjs +505 -78
  40. package/hub/team/interactive-tui-transport.mjs +15 -1
  41. package/hub/team/launcher-template.mjs +19 -2
  42. package/hub/team/orchestrator.mjs +36 -9
  43. package/hub/team/pane.mjs +176 -14
  44. package/hub/team/psmux.mjs +79 -70
  45. package/hub/team/retry-state-machine.mjs +41 -13
  46. package/hub/team/session.mjs +57 -0
  47. package/hub/team/swarm-hypervisor.mjs +1 -0
  48. package/hub/team/swarm-preflight.mjs +47 -0
  49. package/hub/team/synapse-http.mjs +149 -4
  50. package/hub/team/terminal-opener.mjs +68 -13
  51. package/hub/team/tui-viewer.mjs +65 -14
  52. package/hub/team/worktree-lifecycle.mjs +56 -59
  53. package/hub/tools.mjs +17 -0
  54. package/hub/workers/codex-mcp.mjs +52 -7
  55. package/hub/workers/delegator-mcp.mjs +3 -49
  56. package/hud/cli-policy.mjs +69 -0
  57. package/hud/constants.mjs +20 -17
  58. package/hud/context-monitor.mjs +31 -21
  59. package/hud/hud-qos-status.mjs +81 -91
  60. package/hud/providers/claude.mjs +150 -84
  61. package/hud/providers/codex.mjs +10 -1
  62. package/hud/renderers.mjs +21 -59
  63. package/hud/utils.mjs +1 -15
  64. package/package.json +2 -1
  65. package/scripts/__tests__/keyword-detector.test.mjs +89 -1
  66. package/scripts/__tests__/lint-skills.test.mjs +68 -0
  67. package/scripts/__tests__/release-governance.test.mjs +94 -1
  68. package/scripts/__tests__/skill-surface.test.mjs +6 -4
  69. package/scripts/__tests__/tfx-route-bash-node-parity.test.mjs +6 -4
  70. package/scripts/__tests__/tfx-route-node-entry.test.mjs +53 -11
  71. package/scripts/claude-login-detect.mjs +107 -25
  72. package/scripts/ensure-agy-hooks.mjs +31 -1
  73. package/scripts/keyword-detector.mjs +66 -9
  74. package/scripts/lib/agent-route-policy.mjs +367 -0
  75. package/scripts/lib/cli-agy.mjs +24 -4
  76. package/scripts/lib/cli-codex.mjs +22 -160
  77. package/scripts/lib/codex-profile-config.mjs +48 -4
  78. package/scripts/lib/codex-recovery.sh +19 -0
  79. package/scripts/lib/gemini-profiles.mjs +113 -29
  80. package/scripts/lib/keyword-rules.mjs +24 -0
  81. package/scripts/lib/logger.mjs +60 -43
  82. package/scripts/lib/machine-profile.mjs +293 -0
  83. package/scripts/lib/mcp-health.mjs +44 -18
  84. package/scripts/lint-skills.mjs +65 -0
  85. package/scripts/notion-read.mjs +2 -1
  86. package/scripts/pack.mjs +13 -0
  87. package/scripts/release/check-packages-mirror.mjs +58 -1
  88. package/scripts/release/lib.mjs +1 -2
  89. package/scripts/release/prepare.mjs +24 -9
  90. package/scripts/remote-spawn.mjs +830 -32
  91. package/scripts/session-stale-cleanup.mjs +0 -1
  92. package/scripts/setup.mjs +548 -125
  93. package/scripts/sync-hub-mcp-settings.mjs +11 -3
  94. package/scripts/test-lock.mjs +15 -1
  95. package/scripts/tfx-gate-activate.mjs +4 -4
  96. package/scripts/tfx-route-post.mjs +90 -13
  97. package/scripts/tfx-route.mjs +14 -1
  98. package/scripts/tfx-route.sh +716 -177
  99. package/skills/merge-worktree/SKILL.md +3 -3
  100. package/skills/star-prompt/skill.json +1 -1
  101. package/skills/tfx-analysis/SKILL.md +8 -9
  102. package/skills/tfx-analysis/skill.json +1 -10
  103. package/skills/tfx-auto/SKILL.md +203 -46
  104. package/skills/tfx-auto/skill.json +2 -23
  105. package/skills/tfx-doctor/skill.json +0 -3
  106. package/skills/tfx-find/skill.json +0 -7
  107. package/skills/tfx-forge/SKILL.md +2 -2
  108. package/skills/tfx-forge/skill.json +0 -7
  109. package/skills/tfx-goal-clarify/skill.json +5 -0
  110. package/skills/tfx-harness/SKILL.md +36 -70
  111. package/skills/tfx-harness/skill.json +5 -0
  112. package/skills/tfx-hooks/SKILL.md +0 -2
  113. package/skills/tfx-hooks/skill.json +0 -3
  114. package/skills/tfx-hub/SKILL.md +2 -7
  115. package/skills/tfx-hub/skill.json +0 -3
  116. package/skills/tfx-index/skill.json +0 -6
  117. package/skills/tfx-interview/SKILL.md +3 -3
  118. package/skills/tfx-interview/skill.json +1 -13
  119. package/skills/tfx-live/SKILL.md +22 -1
  120. package/skills/tfx-live/skill.json +0 -5
  121. package/skills/tfx-plan/SKILL.md +7 -8
  122. package/skills/tfx-plan/skill.json +1 -12
  123. package/skills/tfx-profile/SKILL.md +25 -15
  124. package/skills/tfx-profile/skill.json +0 -3
  125. package/skills/tfx-prune/SKILL.md +7 -7
  126. package/skills/tfx-prune/skill.json +1 -8
  127. package/skills/tfx-qa/SKILL.md +7 -7
  128. package/skills/tfx-qa/skill.json +1 -11
  129. package/skills/tfx-ralph/SKILL.md +8 -11
  130. package/skills/tfx-remote/SKILL.md +2 -2
  131. package/skills/tfx-remote/skill.json +0 -3
  132. package/skills/tfx-research/SKILL.md +2 -2
  133. package/skills/tfx-research/skill.json +1 -16
  134. package/skills/tfx-review/SKILL.md +11 -11
  135. package/skills/tfx-review/skill.json +1 -11
  136. package/skills/tfx-setup/SKILL.md +5 -6
  137. package/skills/tfx-setup/skill.json +0 -3
  138. package/skills/tfx-ship/skill.json +1 -9
  139. package/skills/tfx-wt/skill.json +0 -7
  140. package/tui/codex-profile.mjs +13 -3
  141. package/tui/gemini-profile.mjs +11 -24
  142. package/tui/monitor.mjs +1 -0
  143. package/tui/setup.mjs +3 -1
  144. package/scripts/headless-guard-fast.sh +0 -29
  145. package/scripts/headless-guard.mjs +0 -523
  146. package/skills/tfx-autopilot/SKILL.md +0 -51
  147. package/skills/tfx-autopilot/skill.json +0 -12
  148. package/skills/tfx-codex-swarm-workspace/iteration-1/benchmark.json +0 -75
  149. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/eval_metadata.json +0 -42
  150. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/grading.json +0 -39
  151. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/analysis.md +0 -87
  152. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/classification.md +0 -35
  153. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/commands.sh +0 -275
  154. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/outputs/routing.md +0 -56
  155. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/with_skill/timing.json +0 -5
  156. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/grading.json +0 -39
  157. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/analysis.md +0 -92
  158. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/classification.md +0 -71
  159. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/commands.sh +0 -264
  160. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/outputs/routing.md +0 -113
  161. package/skills/tfx-codex-swarm-workspace/iteration-1/full-swarm-all-prds/without_skill/timing.json +0 -5
  162. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/eval_metadata.json +0 -32
  163. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/grading.json +0 -29
  164. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/analysis.md +0 -96
  165. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/classification.md +0 -38
  166. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/commands.sh +0 -151
  167. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/outputs/routing.md +0 -51
  168. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/with_skill/timing.json +0 -5
  169. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/grading.json +0 -29
  170. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/analysis.md +0 -127
  171. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/classification.md +0 -57
  172. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/commands.sh +0 -129
  173. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/outputs/routing.md +0 -84
  174. package/skills/tfx-codex-swarm-workspace/iteration-1/implicit-swarm-no-keywords/without_skill/timing.json +0 -5
  175. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/eval_metadata.json +0 -27
  176. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/grading.json +0 -24
  177. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/analysis.md +0 -98
  178. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/classification.md +0 -65
  179. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/commands.sh +0 -123
  180. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/outputs/routing.md +0 -66
  181. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/with_skill/timing.json +0 -5
  182. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/grading.json +0 -20
  183. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/analysis.md +0 -88
  184. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/classification.md +0 -40
  185. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/commands.sh +0 -130
  186. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/outputs/routing.md +0 -61
  187. package/skills/tfx-codex-swarm-workspace/iteration-1/selective-spawn-with-override/without_skill/timing.json +0 -5
  188. package/skills/tfx-consensus/SKILL.md +0 -56
  189. package/skills/tfx-consensus/skill.json +0 -8
  190. package/skills/tfx-debate/SKILL.md +0 -60
  191. package/skills/tfx-debate/skill.json +0 -14
  192. package/skills/tfx-fullcycle/SKILL.md +0 -47
  193. package/skills/tfx-fullcycle/skill.json +0 -13
  194. package/skills/tfx-multi/SKILL.md +0 -45
  195. package/skills/tfx-multi/references/agent-wrapper-rules.md +0 -94
  196. package/skills/tfx-multi/references/thorough-pipeline.md +0 -105
  197. package/skills/tfx-multi/skill.json +0 -10
  198. package/skills/tfx-panel/SKILL.md +0 -60
  199. package/skills/tfx-panel/skill.json +0 -14
  200. package/skills/tfx-persist/SKILL.md +0 -63
  201. package/skills/tfx-persist/skill.json +0 -14
  202. package/skills/tfx-psmux-rules/SKILL.md +0 -41
  203. package/skills/tfx-psmux-rules/skill.json +0 -10
  204. package/skills/tfx-remote-setup/SKILL.md +0 -42
  205. package/skills/tfx-remote-setup/skill.json +0 -10
  206. package/skills/tfx-remote-spawn/SKILL.md +0 -52
  207. package/skills/tfx-remote-spawn/skill.json +0 -10
  208. package/skills/tfx-swarm/SKILL.md +0 -49
  209. package/skills/tfx-swarm/skill.json +0 -13
package/README.md CHANGED
@@ -264,6 +264,8 @@ state without replaying the entire conversation.
264
264
 
265
265
  ## Architecture
266
266
 
267
+ > 상세 구조·패키지 레이아웃·실행 경로는 [ARCHITECTURE.md](ARCHITECTURE.md), 문서 전체 지도는 [docs/README.md](docs/README.md) 참조.
268
+
267
269
  <p align="center">
268
270
  <img src="docs/assets/architecture.svg" alt="triflux architecture" width="680">
269
271
  </p>
@@ -391,7 +393,7 @@ folders. Keep it synchronized when touching mirrored runtime files.
391
393
  | Linux | tmux | Supported. |
392
394
  | Windows | psmux + Windows Terminal | Supported through managed psmux/WT paths. PowerShell is the default psmux shell. |
393
395
 
394
- See `AGENTS.md` and `.claude/rules/tfx-psmux.md` for the stricter Windows/psmux
396
+ See `.claude/rules/tfx-psmux.md` for the stricter Windows/psmux
395
397
  rules used by agents and launch scripts.
396
398
 
397
399
  ---
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: tfx-harness
3
+ description: >
4
+ Use for meta-routing questions. Read the canonical routing SSOT and return
5
+ exactly one branch and immediate owner; do not execute the requested work.
6
+ ---
7
+
8
+ # tfx-harness — Codex adapter
9
+
10
+ This skill is a routing adapter, not an execution engine. Read D0–D11 from the
11
+ canonical routing SSOT, classify the user intent against available host
12
+ capability evidence, and return one immediate owner. Do not copy the routing
13
+ tree, keyword rules, or owner matrix into this file.
14
+
15
+ ## Locate the routing SSOT
16
+
17
+ This skill is installed globally but the SSOT belongs to the Triflux project.
18
+ Try these locations in order and return blocked only when all three fail:
19
+
20
+ 1. `$TFX_ROUTING_SSOT`, when set.
21
+ 2. `.claude/rules/tfx-routing.md` below the main Git worktree, derived from
22
+ the parent of `git rev-parse --git-common-dir`.
23
+ 3. Walk upward from the current working directory looking for
24
+ `.claude/rules/tfx-routing.md`.
25
+
26
+ Do not use `git rev-parse --show-toplevel` for step 2. In a linked worktree it
27
+ returns that worktree root, whose SSOT may be a stale branch snapshot.
28
+ `--git-common-dir` still points to the main repository's `.git` directory.
29
+
30
+ When blocked, include this one-line remedy:
31
+
32
+ `export TFX_ROUTING_SSOT=<triflux clone>/.claude/rules/tfx-routing.md`
33
+
34
+ Prefer `~/.zshenv` for this variable because hooks and headless workers may not
35
+ load interactive `~/.zshrc`. Do not create a global copy or symlink under
36
+ `~/.claude/rules/`; Claude auto-loads that directory into unrelated sessions.
37
+
38
+ ## Return contract
39
+
40
+ Translate only host syntax. Hook-injected routing context is authoritative for
41
+ the current turn. Resolve the SSOT owner against the current Codex Available
42
+ Skills inventory, preserving the exact `$skill` name when it exists.
43
+
44
+ ```text
45
+ [tfx-harness]
46
+ branch: D<n>
47
+ owner: <exactly one immediate owner>
48
+ availability: available | unavailable | unknown
49
+ fallback_notice: <optional>
50
+ status: recommendation-only | dispatching | blocked
51
+ ```
52
+
53
+ - Return exactly one branch and one immediate owner.
54
+ - With unknown availability, do not infer a fallback.
55
+ - With measured unavailability, report
56
+ `owner unavailable → tfx-X fallback` before using the fallback.
57
+ - If the SSOT cannot be read, return
58
+ `blocked: routing SSOT unavailable` and the remedy above.
59
+ - For a “which skill/path?” question, remain recommendation-only.
60
+ - When the user clearly requests execution, read the selected downstream
61
+ `SKILL.md`, invoke or follow that exact Codex `$skill`, and then relinquish
62
+ routing ownership. Do not keep solving the downstream task inside this
63
+ adapter once its owner is available.
64
+ - If the owner is unavailable, use only the fallback explicitly allowed by the
65
+ SSOT and label the measured unavailability before dispatch.
66
+ - Do not select downstream implementation agents, models, profiles, or effort.
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "tfx-harness",
3
+ "version": "1.0.0",
4
+ "host": "codex"
5
+ }