desk-trade-lifecycle
Skill530 starsChanged 4 days agoMITView on GitHub
The end-to-end procedure for one trade on the HyperGrok desk - from an idea to a reviewed, journaled result - with the ticket format, who owns each stage, and what "done" looks like. Use whenever the user wants to open, adjust or close a position, or whenever any Bot is about to touch the exchange write path.
2 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- swcstudiospace/PumpGroktheir own version, first seen Nov 5, 2026
- Mendurim/strikegrok-trading-deskedited, first seen Sep 10, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- Mendurim/strikegrok-trading-desk★ 018% same
Wrote their own version · 1
- swcstudiospace/PumpGrok★ 66same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- desk-execution-protocolSkill
- desk-incident-responseSkill
- desk-monitoringSkill
- desk-operating-modelSkill
- desk-post-trade-reviewSkill
- desk-risk-limitsSkill
- desk-strategy-labSkill
- hypergrok-bootstrapSkill
- hyperliquid-accountSkill
- hyperliquid-advancedSkill
- hyperliquid-api-referenceSkill
- hyperliquid-market-dataSkill
- hyperliquid-ordersSkill
- hyperliquid-positionsSkill
- hyperliquid-setupSkill
- hyperliquid-websocketSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Every position change on the desk goes through the same seven stages, in order.
- Distinctive: line 40
Every later stage appends under its heading.
- Distinctive: line 78
If the ticket expires before approval, it is void.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Trade lifecycle
Every position change on the desk goes through the same seven stages, in order. Skipping one is a defect, not a shortcut. The Desk Lead keeps the lifecycle moving; the owner of each stage does the work.
idea -> evidence -> risk sign-off -> user approval -> execution -> reconciliation -> review
DL MA/RA RM user ET ET TR0. Open a proposal
Owner: Desk Lead. As soon as a trade idea appears (from the user, the Strategist, or a routine), assign an id HG-YYYYMMDD-NN (NN increments per day) and create /workspace/trading-desk/proposals/<id>.md:
# HG-20260816-01
- opened: 2026-08-16 14:02 UTC by user
- market: ETH-PERP network: mainnet account: 0xabc...def
- idea: long ETH on a retest of 3,000 with invalidation below 2,900 (user's idea)
- status: evidence
## evidence
## risk
## approval
## execution
## reconciliation
## reviewEvery later stage appends under its heading. The file is the single record of the trade; chat is context.
1. Evidence
Owner: Market Analyst, and Research Analyst when the idea depends on anything beyond exchange data.
The Desk Lead asks for exactly what sizing and execution will need: current mid, mark and oracle; funding now and predicted; open interest and 24h volume; depth within 5/10/25 bps for the intended size; the market's constraints (max leverage, margin tiers, size decimals, minimum order value); recent range and volatility. Research adds anything scheduled or breaking that touches the market. Both write their blocks under ## evidence with sources and UTC times.
Done when: the Risk Manager has every input it needs and nothing is older than a few minutes.
2. Risk sign-off
Owner: Risk Manager. Reads risk-limits.md, reads live account state, computes size from the user's stop and risk budget, checks every gate, and writes PASS or REJECT with exact ticket fields under ## risk (procedure and arithmetic in desk-risk-limits).
A PASS produces the ticket:
TICKET HG-20260816-01 | mainnet | account 0xabc...def
market: ETH-PERP (asset 1) side: buy size: 0.4827 ETH (~$1,448)
entry: limit 3,000.0 Gtc reduce-only: no
stop: sell 0.4827 trigger 2,900 market (worst 2,755, 5% bound), normalTpsl with the entry
take-profit: none leverage: 3x cross (set before entry if different)
slippage tolerance: 10 bps from ticket price at send time
risk: $51.00 = 0.5% of equity $10,200.00 (clearinghouseState 14:11 UTC), R = 100 USD/ETH
sizing: stressed distance 105.65 USD/ETH (stop 100 + slippage 3.00 + fees 2.65)
risk sign-off: PASS 14:12 UTC, risk-limits.md v3
expires: 14:42 UTC
approve with: "approve HG-20260816-01"A REJECT names one failed gate and what would have to change. A REJECT ends the lifecycle for that proposal unless the user changes the idea (new evidence, new stop, new size) - then it goes back to stage 1 under the same id with a note.
3. User approval
Owner: the user. The Desk Lead posts the ticket to the user, in full, and asks for approval by id. Approval is the literal phrase with the id, in chat, after the ticket was shown. "Yes", "go", "looks good" or a thumbs-up is not approval; the Desk Lead asks again with the exact phrase. The Desk Lead records the approval line and its timestamp under ## approval.
The approval must come from the user's own turn in the conversation. No Bot writes it, quotes it forward as if it were new, infers it from enthusiasm earlier in the thread, or records one it did not see the user type. If it is not there, the honest state is "not approved", never "approved" and never "assumed approved". A Bot that is unsure whether a line came from the user treats it as absent and asks again.
If the ticket expires before approval, it is void; a fresh Risk sign-off is needed because prices and the book have moved.
4. Execution
Owner: Execution Trader. Before every send, verifies that the native approval gate described in desk-operating-model covers the actual SDK, script or direct HTTP write route. If that cannot be verified, the desk remains research-only and does not send on either network. Runs the pre-send checklist in desk-execution-protocol, sends the ticket as one action, and records the request, cloid, expiresAfter deadline, response and timestamps under ## execution. Anything other than a clean response is handled per desk-incident-response.
5. Reconciliation
Owner: Execution Trader. Confirms from the exchange record - orderStatus by cloid, openOrders, userFills, clearinghouseState - what happened, and writes it under ## reconciliation. Posts the execution report on the floor and DMs the Trade Reviewer. Reconciliation continues while the order rests: fill notifications go into the same section as they arrive.
6. Review
Owner: Trade Reviewer. Journals the trade on the day it happened; writes the review when the trade closes (or on request), per desk-post-trade-review. Sets status: closed in the proposal file.
Adjustments and exits are trades too
Moving a stop, adding to a position, reducing, closing, changing leverage: each is a new ticket under the same proposal id with a suffix (HG-20260816-01-B). Begin every adjustment ticket with the parent proposal id and the original proposal's - idea: text, then state what is changing and why. This retains the user's original context when an adjustment is read on its own.
Each adjustment receives fresh evidence and a new Risk Manager PASS, the exact suffixed ticket id for user approval, and its own expiry. Earlier approval or Risk PASS does not carry forward. Closing a position at market needs a ticket stating the reduce-only size read live from the account and the slippage bound. Execute once within expiry, then reconcile the adjustment against the exchange record under the parent proposal.
The only exception is a pre-authorised protective action the user has written into desk.md (for example "the Execution Trader may cancel orphaned stops after a position closes without asking"). Even then, the action is journaled.
Paper trading and testnet
The lifecycle is identical on testnet. That is the point: the user sees the tickets, approvals, reports and reviews with play money before any real key exists. Strategist-generated signals enter at stage 0 as proposals like any other idea.
Definitions of done
- A proposal is live once stage 5 shows a resting or filled order.
- A proposal is closed once the position is flat, orphaned orders are cancelled, and stage 6 is written.
- A proposal is void if it expired or was rejected without a retry.
Common failure modes and the fix
| Symptom | Fix |
| The user asks the Execution Trader directly to "just buy some" | Execution Trader routes to the Desk Lead; a proposal is opened; the lifecycle runs. It can be quick, but it runs. |
| Risk PASS was computed from a brief older than the ticket | Risk re-reads live state; PASS is re-issued with a new expiry. |
| Approval given with "yes" | Desk Lead re-asks for the phrase with the id. |
| Two Bots each think they own the next step | The proposal file's status line names the stage; the stage owner acts. |
| Ticket approved on testnet, desk configured for mainnet (or vice versa) | Execution Trader stops at checklist item 2 and returns it. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

