$git clone https://github.com/s0912758806p/agentic-sop-to-workTurn human SOPs into deterministic, gated agentic workflows — a Claude Code plugin.
| 1 | # agentic-sop-to-work |
| 2 | |
| 3 | [](https://claude.com/claude-code) [](LICENSE) [](plugins/agentic-sop-kit/.claude-plugin/plugin.json) [](plugins/agentic-sop-kit/skills) |
| 4 | |
| 5 | > **Loop Engineering** — make an agent's loop produce **verifiable progress**, stay **honest**, and stay **bounded**, by deterministic mechanism rather than vibes. `agentic-sop-kit` is the reference toolkit: it turns a human SOP into a **controlled loop**, not a one-shot script — no fabrication, no "mega-agent" rot. |
| 6 | > **Loop Engineering** — 用確定性機制(不是 vibes)讓 agent 的迴圈**每次迭代產生可驗證進度、不自我欺騙、不失控**。`agentic-sop-kit` 是它的參考工具包:把人工 SOP 變成一條**受控迴圈**——不臆造、不退化成 mega agent。 |
| 7 | |
| 8 | ``` |
| 9 | /plugin marketplace add s0912758806p/agentic-sop-to-work |
| 10 | /plugin install agentic-sop-kit@agentic-sop-to-work |
| 11 | /reload-plugins |
| 12 | ``` |
| 13 | |
| 14 | **🌐 [English](#english) ・ [繁體中文](#繁體中文)** |
| 15 | |
| 16 | ### 🗺️ At a glance · 運作一覽 |
| 17 | |
| 18 |  |
| 19 | |
| 20 | *Human SOP → single-tool skills → orchestrated flow (gated · branch · map) → DRAFT → human approval; a Stop-hook regression gate guards every change.<br>Human SOP → 單一工具 skill → 編排流程(閘門・分支・map)→ DRAFT → 人核准;Stop-hook 回歸閘門守住每次變更。* |
| 21 | |
| 22 | <details> |
| 23 | <summary>靜態圖 / static diagram</summary> |
| 24 | |
| 25 | ```mermaid |
| 26 | flowchart LR |
| 27 | SOP["📄 Human SOP"] |
| 28 | SK["🔧 single-tool skills<br/>one tool · I/O contract"] |
| 29 | RUN["⚙️ run.py<br/>steps · branch · map · --plan"] |
| 30 | G{{"🚦 per-step gate<br/>cmd · schema · trace · recompute"}} |
| 31 | DR["📝 DRAFT"] |
| 32 | OK(["✋ human approval"]) |
| 33 | STOPN["✗ stop & fix"] |
| 34 | REG[["🔁 Stop-hook regression<br/>change → tests → block & fix"]] |
| 35 | |
| 36 | SOP -- decompose --> SK |
| 37 | SK -- orchestrate --> RUN |
| 38 | RUN --> G |
| 39 | G -- pass --> DR |
| 40 | DR --> OK |
| 41 | G -- fail --> STOPN |
| 42 | REG -. guards every change .-> SK |
| 43 | |
| 44 | style OK fill:#E8F5E9,stroke:#2E7D32,color:#1B5E20 |
| 45 | style G fill:#FFF8E1,stroke:#F9A825 |
| 46 | style REG fill:#FFEBEE,stroke:#C62828,color:#B71C1C |
| 47 | ``` |
| 48 | |
| 49 | </details> |
| 50 | |
| 51 | ### 🔁 The loop, engineered · 受控迴圈的三不變量 |
| 52 | |
| 53 | `agentic-sop-kit` makes the loop a **controlled** one — three deterministic invariants, human-owned at the controlled/destructive edges: |
| 54 | - **Bounded termination · 有界終止** — budget (count) **+ stall (progress)**: stop when iterations stop producing verifiable progress, not only when retries run out. |
| 55 | - **Observable health · 可觀測健康** — a coverage drop **hard-gates**; slowdown / flaky surface as advisory. |
| 56 | - **Bounded state · 有界狀態** — the regression log auto-rotates; run dirs prune on demand (human-authorized). |
| 57 | |
| 58 | *"Human SOP → workflow" is **one application** of this loop; the same loop-control applies to any agent loop.* |
| 59 | |
| 60 | --- |
| 61 | |
| 62 | ## English |
| 63 | |
| 64 | **What.** `agentic-sop-kit` is a **Loop Engineering** toolkit: it turns a process you do by hand (a "Human SOP") into a **controlled agentic loop** an LLM can run safely and repeatably — with bounded termination, observable health, and bounded state. A methodology + portable toolkit — not a chatbot. Built for regulated / high-stakes / must-be-correct work. |
| 65 | |
| 66 | **Why it's safe** — it blocks the predictable LLM failures: |
| 67 | - **Fabrication** → facts come only from inputs; gaps marked `【待補】`, never invented. |
| 68 | - **Fake autonomy** → deterministic work in code; hard gates are hermetic & LLM-free (self-eval only advisory, capped). |
| 69 | - **Unaccountable output** → every output is a **DRAFT**; controlled / high-risk calls stay human-owned. |
| 70 | - **Mega-agent rot** → an audit skill + a Stop-hook **regression gate** that re-verifies on every change. |
| 71 | |
| 72 | **What you get** |
| 73 | |
| 74 | | | | |
| 75 | |---|---| |
| 76 | | **3 Skills** (auto-trigger by intent) | `six-rung-ladder` — minimalist "should I build this at all?" filter (**decide**) · `agentic-sop` — methodology + entry point + smart intake (**build**) · `agentic-workflow-audit` — read-only mega-agent auditor (**audit**) | |
| 77 | | **Command** `/agentic-sop-kit:sop-flow` | runs the kit's orchestration, reports a DRAFT | |
| 78 | | **Hooks** (project-scoped) | `SessionStart` dep-check · `Stop` regression gate — **no-op until a project adopts the kit** | |
| 79 | | **Portable kit** `kit/` | copy-into-any-project methodology + runnable example | |
| 80 | | **Plugin** `alcoa-guard` | ALCOA+ data-integrity linter — deterministic checks for Attributable / Contemporaneous / Complete / Accurate / Consistent; surfaces the human-judgment slice as a `【待補】` checklist; pure stdlib; report is a DRAFT | |
| 81 | | **Plugin** `plugin-forge` | Claude Code plugin linter + scaffolder — `lint` validates a plugin or whole marketplace against a house grammar (strict super |