leeovery/tick/tree/main/.claude/skills/workflow-gates
workflow-gates
agentic-workflows 엔진의 게이트를 프롬프트 위 밴드에 그리는 Claude Code 모드입니다. 행을 클릭하면 프롬프트에 들어가고 다시 클릭하면 전송되므로 모델이 메뉴를 재현할 필요가 없습니다.
이 mod 소개
workflow-gates
워크플로 엔진의 게이트를 모델이 다시 만들게 두는 대신 프롬프트 위 밴드에 그리는 Claude Code 모드입니다.
엔진은 자신이 만든 메뉴 옆에 각 게이트를 데이터로 기록합니다. 이 모드는 세션 시작 때 자신을 알리고 엔진이 그 데이터를 모으게 합니다. 데이터가 담긴 Bash 결과로 게이트를 준비하고, 모델이 읽는 내용에서 메뉴를 잘라 내며, 트랜스크립트가 스크롤되어도 제자리에 남는 행으로 그립니다. 터미널이 아닌 화면이 연결된 동안에는 모든 화면에 메뉴가 보이도록 텍스트로 남겨 두지만, 터미널에서 메뉴를 그린 뒤 연결한 화면에는 그 메뉴가 나타나지 않습니다. 어떤 게이트의 문구도 모드 이름을 말하지 않으며, 모드가 켜졌지만 아직 실행되지 않았을 때 workflow-start의 설정 단계만 이름을 언급합니다.
행을 클릭하면 답이 프롬프트 상자에 들어가고, 다시 클릭하면 다음 메시지로 전송되어 워크플로가 답으로 읽습니다. 클릭으로 밴드가 키보드를 받으면 화살표로 행 사이를 이동할 수 있고 Enter 또는 행 자체의 키로 선택할 수 있으며, 선택한 행에서 Enter를 누르면 전송됩니다. 전송된 답은 플러그인 이름 아래 들어가 모델용 형식으로 감싸지고 트랜스크립트에는 플러그인 메시지로 표시됩니다. 모드는 보낸 내용을 대화 자체의 폴더에 sent.json으로 남깁니다. 다른 플러그인 workflow-gates-rows가 이 기록을 읽어 행을 질문과 답으로 그립니다.
이 모드는 워크플로의 일부입니다. 프로젝트에서 첫 /workflow-start를 실행하면 실행할 수 있는 곳에서 켜집니다. 대상은 Claude Code의 터미널 앱이며 2.1.282부터 이 디렉터리가 프로젝트에 설치되어 있어야 합니다. Function hooks는 early access입니다. CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1을 설정한 곳에서만 Claude Code가 이 모드를 로드합니다. 작업 명령은 npm run mod:types, npm run typecheck:mod, npm run test:mod입니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add leeovery/tick claude plugin install workflow-gates
원문 / README
workflow-gates
A Claude Code mod that draws the workflow engine's gates in the band above the prompt instead of leaving the model to reproduce them.
The engine states each gate as data beside the menu it composed. This mod announces itself at the session's start so the engine collects that data, arms the gate off the Bash result that carried it, cuts the menu out of what the model reads, and draws the rows where they stay put while the transcript scrolls; while any screen but the terminal is attached, it leaves the menu as text so every screen shows it, though a screen that attaches after a menu was drawn on the terminal does not get that menu. No gate's prose names the mod; only workflow-start's setup step does, when the mod is switched on but not yet running.
A click on a row puts its answer in the prompt box; a second click on it sends
it as the next message, which the workflows read as the answer. Once a click
has given the band the keyboard, the arrows move between rows, Enter or a row's
own key picks, and Enter on the picked row sends. A sent answer enters under
the plugin's name, framed for the model and labelled in the transcript as the
plugin's; the mod leaves what it sent in the conversation's own folder (see
below) as sent.json. A second plugin, workflow-gates-rows
(../workflow-gates-rows/), reads that record to draw the row as the question
and the answer, since no plugin can redraw the row of a prompt it submitted.
Typing answers too: a key and Enter at the prompt, or Esc then Enter after a
pick. Rows only typing can answer — Ask, Comment, a range — draw dim, and a
click on one says to type it in the prompt. The footer under the rows says
which: how to answer, what is in the prompt, or where to type.
The band is never taller than the rows Claude Code gives it, so it never
scrolls. A gate that fits shows whole: a rule, the statement and the question,
the rows, the footer. One that does not keeps its rule, question and footer in
place and shows its rows a page at a time, every page the same height, over a
line reading ↑ previous ↓ next page 1 of 3; a click on either turns the
page and puts the cursor on its first row. The arrows carry the cursor across
pages, the page following it, and a row's own key picks that row whichever
page it is on.
A turn the person did not start — a background agent's report, a
notification, a schedule — leaves the band as it is, its rows live. The band
comes off when the person starts a turn or replies into a running one, or when
a turn draws a different gate over it. Esc on such a turn leaves the band as it
is, unless the turn had already rendered a different gate: the model now waits
at that gate's stop, so the band empties. A second click while Claude works
holds the answer instead of sending it: its row reads · queued, and the
footer says it sends when Claude finishes. A click on the queued row takes it
back to a pick, and a click on another row picks that one instead. As the turn
ends, the held answer sends if the same gate is still on the band; if the turn
rendered a different gate, the answer is dropped unsent, and the new gate's
footer says so; if Esc stopped the turn with the same gate still up, the
answer goes back into the prompt box as a pick. When a pick's gate goes, its
answer leaves the prompt box too, unless the person has edited it there.
Typing while Claude works joins Claude Code's own queue.
Esc on a turn an answer started or joined puts its gate back, dropping
whatever that turn drew, as long as no tool has run in it; once one has, the
band stays empty, since the mod cannot tell a read from a write. A /clear
takes the gate off the band.
At the end of every turn, and as the conversation ends, the mod keeps what the
band shows — the gate, or nothing — in the conversation's own folder,
~/.config/workflows/conversations/{session-id}/gate.json (under
WORKFLOWS_CONFIG_DIR where that is set, beside the workflows' system
config), found by the session id wherever the session's working directory has
moved, and stamped with where the transcript ends, not counting the lines
Claude Code writes around an interrupted turn. A conversation resumed with
claude --resume or /resume, or picked up again by a restart or a reload of
the mod's files, gets its gate back as long as its transcript still ends
there, with nothing picked or held — a held answer waits on a turn that does
not come back; one that moved on while the mod was not loaded gets nothing. A
session the mod was loaded into after it started carries no announcement, so
there it keeps and reads back nothing, and a conversation that does not run
the workflows has no folder and keeps nothing — nor does one in a process
that names neither a home directory nor WORKFLOWS_CONFIG_DIR. The folder
holds one gate, and goes once Claude Code has deleted the conversation's
transcript, so a kept gate lives as long as its conversation can be resumed,
with one exception: a conversation whose end the session-end hook never saw
keeps its folder — the session that first installed the hook, which Claude
Code picks up only as a session starts, or one that crashed.
The engine emits the menu regardless, so where the mod is off or absent the model reads the text menu the engine wrote.
The mod is part of the workflows, and the first /workflow-start in a
project switches it on wherever it can run: Claude Code's terminal app, from
2.1.282, with this directory installed in the project. There every
/workflow-start puts CLAUDE_CODE_ENABLE_FUNCTION_HOOKS into the env of
the project's .claude/settings.json wherever it is not already "1".
Claude Code reads its settings only when it starts, so a start that writes it
ends by asking for a restart, and the next session loads the mod; a start
that finds it there with the mod not running stops and says why. Anywhere
else — the web, another Claude Code app, an older version, a project without
this directory — nothing is written, and the workflows carry on with the text
menus.
The flag is committed, so a teammate's IDE extension, Claude Code on the web
or a Claude Code older than 2.1.282 can still load the mod. At the session's
start it applies the boot's rules: where CLAUDE_CODE_ENTRYPOINT is other
than cli, CLAUDE_CODE_REMOTE is set, or the version the session reports is
older than 2.1.282 or not a release's (a development build counts as older, as
it does for the boot), it announces nothing, so it draws, keeps and sets
nothing — the menus stay text, and Claude Code runs as it would without it.
What it sets in Claude Code
Every session in Claude Code's terminal app, from 2.1.282, starts with Claude
Code's SendUserMessage tool switched on (CLAUDE_CODE_PEWTER_OWL_TOOL=true):
Claude Code builds its tool list just after the session starts, so that is
the only moment the switch counts. The mod keeps the tool behind ToolSearch
in every such session, one answer that never changes and so never spends the
prompt cache; a plain session's tool list is Claude Code's own.
In a conversation that runs the workflows there, the mod sets
CLAUDE_CODE_THINKING_DISPLAY_UPDATES=false, which stops one-line summaries of
Claude's thinking printing as if they were output, and
CLAUDE_CODE_SILENT_TURN_REMINDER=false, which stops the nudge to say what
Claude is doing; project settings cannot set the second. Claude Code reads
both per request. Every engine call marks the conversation that made it — a
workflow file in its folder, named by the session id Claude Code hands every
command — and the mod reads that mark by its own session id after each of the
conversation's Bash calls and when it starts, so a command that only mentions
the engine marks nothing. What the settings replace, the person's own value or
none, is kept in the process's environment (WORKFLOWS_HARNESS_REPLACED),
which a reload of the mod's files keeps, and a /clear or a resume puts it
back exactly. A marked conversation gets the workflow values back when the mod
next follows it, whether claude --resume, a restart or /resume in the same
process brings it back. A plain conversation in the same project keeps Claude
Code's defaults and the person's own settings: the mod never touches either
there.
Working on it
npm run mod:types # fetch the API declarations into types/ (gitignored)
npm run typecheck:mod # tsc against those declarations
npm run test:mod # claude plugin test
The declarations come from the Claude Code repository and are regenerable, so they are not committed. Fetch them before the first typecheck.
Function hooks are early access: Claude Code loads this mod only where
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 is set, in the env of any of its
settings files or in the shell, and the test script sets it for itself.
동명의 다른 작품
- workflow-gatesleeovery · ★ 3
