Skip to content

Fize/mmtickerlab / trading-sop

trading-sop

Verified

A股交易标准操作程序(SOP)总编排。从用户的自然语言输入出发,识别当前交易意图(盘前准备、盘中复盘、盘后复盘、个股深度研究、首板隔夜),按需编排调用现有技能流水线,最终输出可操作的决策建议。当用户提出日常交易操作、盘前准备、盘中复盘、盘后总结、全流程投研或个股深研请求时触发(包含触发词:今天怎么操作, 帮我做盘前, 复盘一下, 研究一下, 首板今晚要不要留, 当前市场适合买吗, 给我一套完整分析, 全流程分析, SOP, 操作建议, 我要开始做功课了, trading sop)。

tests/test_skill_contracts.py

View on GitHub
import unittest
from pathlib import Path


ROOT = Path(__file__).resolve().parents[2]
SKILLS = (
    "market",
    "market-intel",
    "plan-review",
    "risk-guard",
    "industry-research",
    "asset-analysis",
    "first-board-overnight",
    "ticker-pipeline",
    "trading-sop",
)


class SkillContractTests(unittest.TestCase):
    def test_each_skill_declares_standalone_data_contract(self):
        for name in SKILLS:
            with self.subTest(skill=name):
                text = (ROOT / name / "SKILL.md").read_text(encoding="utf-8")
                self.assertRegex(text, r"(?m)^name:\s*\S+")
                self.assertRegex(text, r"(?m)^description:\s*\S+")
                self.assertIn("独立", text)
                self.assertIn("补充", text)
                self.assertRegex(text, r"核验|校验|验证")

    def test_trading_sop_preserves_fail_closed_rule(self):
        text = (ROOT / "trading-sop" / "SKILL.md").read_text(encoding="utf-8")
        self.assertRegex(text, r"仍不可用.*停止|停止.*仍不可用")

    def test_daily_review_references_optional_reports(self):
        text = (ROOT / "trading-sop" / "references" / "sop-a-daily.md").read_text(
            encoding="utf-8"
        )
        self.assertIn("午间复盘可以独立运行", text)
        self.assertIn("盘后复盘可以独立运行", text)
        self.assertNotIn("必须存在同日盘前计划报告", text)

    def test_first_board_uses_structured_snapshot_gate(self):
        text = (ROOT / "trading-sop" / "references" / "sop-c-firstboard.md").read_text(
            encoding="utf-8"
        )
        self.assertIn("结构化快照", text)
        self.assertIn("报告是可选的", text)
        self.assertIn("BLOCKED", text)


if __name__ == "__main__":
    unittest.main()
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall