iceni 0.1.0__tar.gz

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 (121) hide show
  1. iceni-0.1.0/.github/workflows/ci.yml +45 -0
  2. iceni-0.1.0/.gitignore +24 -0
  3. iceni-0.1.0/LICENSE +21 -0
  4. iceni-0.1.0/PKG-INFO +292 -0
  5. iceni-0.1.0/README.md +266 -0
  6. iceni-0.1.0/benchmarks/free-tests/RESULTS.md +72 -0
  7. iceni-0.1.0/benchmarks/free-tests/SFS-RESULTS.md +63 -0
  8. iceni-0.1.0/benchmarks/free-tests/cross-model-kit.md +85 -0
  9. iceni-0.1.0/benchmarks/free-tests/inputs/t01_review_module.py +64 -0
  10. iceni-0.1.0/benchmarks/free-tests/inputs/t02_testgen_settings_view.py +52 -0
  11. iceni-0.1.0/benchmarks/free-tests/inputs/t03_refactor_callbacks.py +69 -0
  12. iceni-0.1.0/benchmarks/free-tests/inputs/t04_docstring_ml_pipeline.py +56 -0
  13. iceni-0.1.0/benchmarks/free-tests/inputs/t05_error_traceback.txt +47 -0
  14. iceni-0.1.0/benchmarks/free-tests/inputs/t06_deploy_k8s.yaml +56 -0
  15. iceni-0.1.0/benchmarks/free-tests/inputs/t07_deps_requirements.txt +55 -0
  16. iceni-0.1.0/benchmarks/free-tests/inputs/t08_api_fastapi_router.py +61 -0
  17. iceni-0.1.0/benchmarks/free-tests/inputs/t09_commit_diff.patch +100 -0
  18. iceni-0.1.0/benchmarks/free-tests/inputs/t10_security_middleware.py +51 -0
  19. iceni-0.1.0/benchmarks/free-tests/outputs/t01_baseline.txt +28 -0
  20. iceni-0.1.0/benchmarks/free-tests/outputs/t01_iceni.txt +32 -0
  21. iceni-0.1.0/benchmarks/free-tests/outputs/t06_baseline.txt +50 -0
  22. iceni-0.1.0/benchmarks/free-tests/outputs/t06_iceni.txt +74 -0
  23. iceni-0.1.0/benchmarks/free-tests/outputs/t07_baseline.txt +72 -0
  24. iceni-0.1.0/benchmarks/free-tests/outputs/t07_iceni.txt +282 -0
  25. iceni-0.1.0/benchmarks/free-tests/outputs/t08_baseline.txt +51 -0
  26. iceni-0.1.0/benchmarks/free-tests/outputs/t08_iceni.txt +168 -0
  27. iceni-0.1.0/benchmarks/free-tests/outputs/t10_baseline.txt +76 -0
  28. iceni-0.1.0/benchmarks/free-tests/outputs/t10_iceni.txt +151 -0
  29. iceni-0.1.0/benchmarks/free-tests/parse_inputs/_mapping.json +12 -0
  30. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p01.txt +32 -0
  31. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p02.txt +72 -0
  32. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p03.txt +74 -0
  33. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p04.txt +76 -0
  34. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p05.txt +168 -0
  35. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p06.txt +28 -0
  36. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p07.txt +151 -0
  37. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p08.txt +50 -0
  38. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p09.txt +282 -0
  39. iceni-0.1.0/benchmarks/free-tests/parse_inputs/p10.txt +51 -0
  40. iceni-0.1.0/benchmarks/free-tests/rendered/t01_a.txt +75 -0
  41. iceni-0.1.0/benchmarks/free-tests/rendered/t01_b.txt +66 -0
  42. iceni-0.1.0/benchmarks/free-tests/rendered/t02_a.txt +63 -0
  43. iceni-0.1.0/benchmarks/free-tests/rendered/t02_b.txt +54 -0
  44. iceni-0.1.0/benchmarks/free-tests/rendered/t03_a.txt +80 -0
  45. iceni-0.1.0/benchmarks/free-tests/rendered/t03_b.txt +71 -0
  46. iceni-0.1.0/benchmarks/free-tests/rendered/t04_a.txt +67 -0
  47. iceni-0.1.0/benchmarks/free-tests/rendered/t04_b.txt +58 -0
  48. iceni-0.1.0/benchmarks/free-tests/rendered/t05_a.txt +58 -0
  49. iceni-0.1.0/benchmarks/free-tests/rendered/t05_b.txt +49 -0
  50. iceni-0.1.0/benchmarks/free-tests/rendered/t06_a.txt +66 -0
  51. iceni-0.1.0/benchmarks/free-tests/rendered/t06_b.txt +58 -0
  52. iceni-0.1.0/benchmarks/free-tests/rendered/t07_a.txt +66 -0
  53. iceni-0.1.0/benchmarks/free-tests/rendered/t07_b.txt +57 -0
  54. iceni-0.1.0/benchmarks/free-tests/rendered/t08_a.txt +71 -0
  55. iceni-0.1.0/benchmarks/free-tests/rendered/t08_b.txt +63 -0
  56. iceni-0.1.0/benchmarks/free-tests/rendered/t09_a.txt +111 -0
  57. iceni-0.1.0/benchmarks/free-tests/rendered/t09_b.txt +102 -0
  58. iceni-0.1.0/benchmarks/free-tests/rendered/t10_a.txt +62 -0
  59. iceni-0.1.0/benchmarks/free-tests/rendered/t10_b.txt +53 -0
  60. iceni-0.1.0/benchmarks/free_test_render.py +56 -0
  61. iceni-0.1.0/benchmarks/report-10task-offline.md +67 -0
  62. iceni-0.1.0/benchmarks/sample-report.offline.md +26 -0
  63. iceni-0.1.0/benchmarks/sfs_test.py +158 -0
  64. iceni-0.1.0/benchmarks/tasks.10-task.json +171 -0
  65. iceni-0.1.0/benchmarks/tasks.sample.json +46 -0
  66. iceni-0.1.0/examples/buggy_example.py +5 -0
  67. iceni-0.1.0/examples/order_service.py +82 -0
  68. iceni-0.1.0/examples/user_api.py +66 -0
  69. iceni-0.1.0/library/CATALOG.md +247 -0
  70. iceni-0.1.0/library/build_library.py +311 -0
  71. iceni-0.1.0/pyproject.toml +29 -0
  72. iceni-0.1.0/site/index.html +213 -0
  73. iceni-0.1.0/src/iceni/__init__.py +8 -0
  74. iceni-0.1.0/src/iceni/__main__.py +4 -0
  75. iceni-0.1.0/src/iceni/benchmark.py +371 -0
  76. iceni-0.1.0/src/iceni/calibration.py +87 -0
  77. iceni-0.1.0/src/iceni/cli.py +636 -0
  78. iceni-0.1.0/src/iceni/config.py +74 -0
  79. iceni-0.1.0/src/iceni/discovery.py +272 -0
  80. iceni-0.1.0/src/iceni/feedback.py +123 -0
  81. iceni-0.1.0/src/iceni/intent.py +44 -0
  82. iceni-0.1.0/src/iceni/mcp_server.py +263 -0
  83. iceni-0.1.0/src/iceni/packs/architecture-design.json +237 -0
  84. iceni-0.1.0/src/iceni/packs/business-strategy.json +258 -0
  85. iceni-0.1.0/src/iceni/packs/code-quality-plus.json +258 -0
  86. iceni-0.1.0/src/iceni/packs/code-quality.json +76 -0
  87. iceni-0.1.0/src/iceni/packs/daily-dev.json +48 -0
  88. iceni-0.1.0/src/iceni/packs/debugging.json +237 -0
  89. iceni-0.1.0/src/iceni/packs/decisions-planning.json +258 -0
  90. iceni-0.1.0/src/iceni/packs/devops-deploy.json +216 -0
  91. iceni-0.1.0/src/iceni/packs/document-data.json +258 -0
  92. iceni-0.1.0/src/iceni/packs/documentation.json +237 -0
  93. iceni-0.1.0/src/iceni/packs/email-comms.json +258 -0
  94. iceni-0.1.0/src/iceni/packs/git-workflow.json +237 -0
  95. iceni-0.1.0/src/iceni/packs/lang-tools.json +174 -0
  96. iceni-0.1.0/src/iceni/packs/learning-explain.json +258 -0
  97. iceni-0.1.0/src/iceni/packs/marketing-content.json +279 -0
  98. iceni-0.1.0/src/iceni/packs/refactoring.json +279 -0
  99. iceni-0.1.0/src/iceni/packs/research-analysis.json +279 -0
  100. iceni-0.1.0/src/iceni/packs/testing.json +279 -0
  101. iceni-0.1.0/src/iceni/packs/writing-pro.json +300 -0
  102. iceni-0.1.0/src/iceni/providers/__init__.py +2 -0
  103. iceni-0.1.0/src/iceni/providers/anthropic.py +31 -0
  104. iceni-0.1.0/src/iceni/providers/base.py +50 -0
  105. iceni-0.1.0/src/iceni/providers/openai_compat.py +34 -0
  106. iceni-0.1.0/src/iceni/sql/0001_init.sql +91 -0
  107. iceni-0.1.0/src/iceni/sql/0002_exec_feedback.sql +6 -0
  108. iceni-0.1.0/src/iceni/sql/0003_edit_signal.sql +5 -0
  109. iceni-0.1.0/src/iceni/store/__init__.py +1 -0
  110. iceni-0.1.0/src/iceni/store/aliases.py +284 -0
  111. iceni-0.1.0/src/iceni/store/db.py +34 -0
  112. iceni-0.1.0/src/iceni/trust/__init__.py +8 -0
  113. iceni-0.1.0/src/iceni/trust/identity.py +23 -0
  114. iceni-0.1.0/src/iceni/trust/keystore.py +26 -0
  115. iceni-0.1.0/src/iceni/trust/sign.py +38 -0
  116. iceni-0.1.0/tests/test_discovery.py +83 -0
  117. iceni-0.1.0/tests/test_feedback.py +92 -0
  118. iceni-0.1.0/tests/test_packs.py +44 -0
  119. iceni-0.1.0/tests/test_router.py +66 -0
  120. iceni-0.1.0/tests/test_share.py +58 -0
  121. iceni-0.1.0/tests/test_smoke.py +88 -0
@@ -0,0 +1,45 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Tests (Python ${{ matrix.python-version }})
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: ["3.11", "3.12"]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ cache: pip
25
+
26
+ - name: Install ICENI
27
+ run: pip install -e ".[all]"
28
+
29
+ - name: Initialise local store
30
+ run: iceni init
31
+
32
+ - name: Install workflow packs
33
+ run: iceni pack install all
34
+
35
+ - name: Run tests
36
+ run: python -m pytest tests/ -v --tb=short
37
+
38
+ - name: Smoke — list workflows
39
+ run: iceni list | head -20
40
+
41
+ - name: Smoke — render a workflow (no API key)
42
+ run: iceni run review --preview --model claude
43
+
44
+ - name: Stats
45
+ run: iceni stats
iceni-0.1.0/.gitignore ADDED
@@ -0,0 +1,24 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ build/
7
+ dist/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ .venv/
11
+ venv/
12
+
13
+ # ICENI local state / demo homes
14
+ .iceni/
15
+ .iceni-demo*/
16
+ *.db
17
+ *.db-wal
18
+ *.db-shm
19
+
20
+ # Stray exported alias files + caches + editor dirs
21
+ /*.iceni
22
+ .mypy_cache/
23
+ .idea/
24
+ .vscode/
iceni-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Steven Tobin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
iceni-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,292 @@
1
+ Metadata-Version: 2.4
2
+ Name: iceni
3
+ Version: 0.1.0
4
+ Summary: Auto-discovered, cross-model-calibrated, self-evolving prompt aliases for AI agents
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.11
8
+ Requires-Dist: click>=8.1
9
+ Requires-Dist: cryptography>=42
10
+ Requires-Dist: mcp>=1.0
11
+ Provides-Extra: all
12
+ Requires-Dist: anthropic>=0.40; extra == 'all'
13
+ Requires-Dist: hdbscan>=0.8; extra == 'all'
14
+ Requires-Dist: openai>=1.50; extra == 'all'
15
+ Requires-Dist: scikit-learn>=1.4; extra == 'all'
16
+ Requires-Dist: sentence-transformers>=3.0; extra == 'all'
17
+ Provides-Extra: discovery
18
+ Requires-Dist: hdbscan>=0.8; extra == 'discovery'
19
+ Requires-Dist: scikit-learn>=1.4; extra == 'discovery'
20
+ Requires-Dist: sentence-transformers>=3.0; extra == 'discovery'
21
+ Provides-Extra: mcp
22
+ Provides-Extra: models
23
+ Requires-Dist: anthropic>=0.40; extra == 'models'
24
+ Requires-Dist: openai>=1.50; extra == 'models'
25
+ Description-Content-Type: text/markdown
26
+
27
+ # ICENI Protocol
28
+
29
+ [![CI](https://github.com/stevenjtobin/iceni-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/stevenjtobin/iceni-protocol/actions/workflows/ci.yml)
30
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/)
31
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
32
+ [![Workflows](https://img.shields.io/badge/workflows-208-orange)](library/CATALOG.md)
33
+ [![Platforms](https://img.shields.io/badge/tested%20on-Claude%20%7C%20ChatGPT%20%7C%20Kimi-blueviolet)](#which-ai-platforms-are-tested-and-working)
34
+
35
+ **Save your best AI instructions once. Use them everywhere — in one word.**
36
+
37
+ ICENI is a reusable-workflow system for AI assistants. You write an expert prompt once, give it a name (`review`, `security-audit`, `refactor`), and from then on that word is all you type. ICENI renders the right calibrated prompt for whichever model you're using — Claude, ChatGPT, or Kimi — and produces structured, consistent output every time.
38
+
39
+ It won't make the model smarter. It will save you from retyping the same 60-word instruction block a hundred times, get the answer right first time (no re-runs), and produce output that other tools and agents can parse reliably.
40
+
41
+ ---
42
+
43
+ ## Who is this for?
44
+
45
+ | Person | What ICENI does for them |
46
+ |---|---|
47
+ | **Developer** | `review`, `refactor`, `test-gen`, `security-audit` in every project — same structured output every time |
48
+ | **Writer / marketer** | `blog-outline`, `email-reply`, `summarize` with your house style baked in |
49
+ | **Analyst / researcher** | `research-brief`, `compare`, `decisions` with consistent format to feed into pipelines |
50
+ | **Team lead** | Export a signed alias, the whole team imports it — one standard, signature-verified |
51
+ | **Claude Code user** | `/iceni` inside Claude Code runs your full workflow library in the terminal |
52
+
53
+ ---
54
+
55
+ ## Which AI platforms are tested and working?
56
+
57
+ | Platform | Integration | Status |
58
+ |---|---|---|
59
+ | **Claude Desktop** | MCP server — workflows appear under `+` → Connectors → `iceni` | ✅ Tested |
60
+ | **Claude Code** | Skill (`/iceni`) + CLI via `python -m iceni` | ✅ Tested |
61
+ | **ChatGPT** | CLI with `--model gpt` (OpenAI API key required) | ✅ Tested |
62
+ | **Kimi (Moonshot)** | CLI with `--model kimi` (Moonshot API key required) | ✅ Tested |
63
+ | **Any OpenAI-compatible API** | Set `OPENAI_API_KEY` + base URL | Works offline, render only |
64
+ | **No AI at all** | `--preview` mode renders the prompt without calling any model | ✅ Works offline |
65
+
66
+ The core features — create, list, show, export, import — work **completely offline with no API keys**.
67
+
68
+ ---
69
+
70
+ ## Quickstart (5 minutes, no API key needed)
71
+
72
+ ### Prerequisites
73
+
74
+ - Python 3.10+
75
+ - pip
76
+ - Claude Desktop (for the `+` → Connectors integration) **or** Claude Code (for `/iceni`)
77
+
78
+ ### Step 1 — Install
79
+
80
+ ```bash
81
+ git clone https://github.com/stevenjtobin/iceni-protocol.git
82
+ cd iceni-protocol
83
+ pip install -e .
84
+ ```
85
+
86
+ Verify it works:
87
+ ```bash
88
+ iceni --version
89
+ iceni doctor
90
+ ```
91
+
92
+ ### Step 2 — Initialise your library
93
+
94
+ ```bash
95
+ iceni init
96
+ ```
97
+
98
+ This creates a local store in `~/.iceni/` (never committed, never shared).
99
+
100
+ > **Your data stays local.** ICENI makes no network calls unless you explicitly set an API key and run `--execute`. No telemetry, no cloud sync, no passive collection of your conversations. The auto-discovery command (`iceni discover`) is manual and opt-in — it reads your local Claude Code logs only when you ask it to, proposes candidates, and signs nothing until you approve. You can delete `~/.iceni/` at any time to reset completely.
101
+
102
+ ### Step 3 — Install a workflow pack
103
+
104
+ ```bash
105
+ iceni pack list # see all 19 packs (208 workflows)
106
+ iceni pack install code-quality-plus # install one pack
107
+ iceni pack install all # or install everything at once
108
+ iceni list # confirm they're there
109
+ ```
110
+
111
+ ### Step 4 — Connect to Claude Desktop (optional)
112
+
113
+ ```bash
114
+ iceni connect-desktop
115
+ ```
116
+
117
+ Restart Claude Desktop → click **`+`** (bottom-left) → **Connectors** → **`iceni`**. Your workflows appear. Pick one, paste your content, done.
118
+
119
+ > **Can't find it?** Make sure you restarted Claude Desktop after running `connect-desktop`. The `+` button is in the chat input bar, not the sidebar.
120
+
121
+ ### Step 5 — Try your first workflow
122
+
123
+ **In the terminal (no AI key needed — preview only):**
124
+ ```bash
125
+ iceni run review examples/buggy_example.py --preview --model claude
126
+ ```
127
+
128
+ **In Claude Desktop:** Click `+` → Connectors → `iceni` → choose `security-audit` → paste any code.
129
+
130
+ **In Claude Code:** Type `/iceni` and pick a workflow from the menu.
131
+
132
+ ---
133
+
134
+ ## The 208-workflow library
135
+
136
+ ICENI ships with 19 themed packs covering the most common AI tasks:
137
+
138
+ **Code packs** — `code-quality-plus`, `testing`, `refactoring`, `documentation`, `debugging`, `git-workflow`, `architecture-design`, `devops-deploy`, `lang-tools`
139
+
140
+ **Chat / writing packs** — `writing-pro`, `email-comms`, `research-analysis`, `business-strategy`, `marketing-content`, `learning-explain`, `decisions-planning`, `document-data`
141
+
142
+ See the full list: [`library/CATALOG.md`](library/CATALOG.md)
143
+
144
+ ```bash
145
+ iceni pack list # browse all packs
146
+ iceni pack install testing # install one
147
+ iceni list # see your installed workflows
148
+ iceni show review # inspect a workflow + signature
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Create your own workflow
154
+
155
+ ```bash
156
+ iceni create my-brief \
157
+ --goal "Write a one-page project brief from bullet points." \
158
+ --input "{{notes}}" \
159
+ --constraint "plain English, no jargon" \
160
+ --output-format "Problem / Approach / Outcome / Next steps" \
161
+ --hint "claude=use XML sections" \
162
+ --hint "gpt=use markdown headers"
163
+ ```
164
+
165
+ Each workflow gets an Ed25519 signature. When you share it, the recipient's `iceni import` verifies the signature before installing — tampered aliases are rejected.
166
+
167
+ ---
168
+
169
+ ## Share with your team
170
+
171
+ ```bash
172
+ iceni export review # → review.iceni (signed, portable)
173
+ # send review.iceni to a colleague
174
+ iceni import review.iceni # verified + installed on their machine
175
+ ```
176
+
177
+ ---
178
+
179
+ ## Key commands
180
+
181
+ ```bash
182
+ iceni list # all installed workflows
183
+ iceni show <name> # prompt text + signature status
184
+ iceni run <name> <file> # render prompt for a file (--preview skips the API call)
185
+ iceni compare <name> # side-by-side Claude / GPT / Kimi renderings
186
+ iceni stats # your accumulated savings (words saved, re-runs avoided)
187
+ iceni pack list # browse all 19 packs
188
+ iceni pack install <name> # add a pack
189
+ iceni export <name> # portable signed alias file
190
+ iceni import <name>.iceni # verified install from a file
191
+ iceni connect-desktop # wire into Claude Desktop automatically
192
+ iceni mcp # start the MCP stdio server manually (for debugging)
193
+ iceni doctor # check config + which model keys are set
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Using API keys (live model calls)
199
+
200
+ ICENI works **without any API key** in `--preview` mode. To call models directly:
201
+
202
+ ```bash
203
+ # Windows PowerShell
204
+ $env:ANTHROPIC_API_KEY = "sk-ant-..."
205
+ $env:OPENAI_API_KEY = "sk-..."
206
+ $env:MOONSHOT_API_KEY = "..."
207
+
208
+ iceni run review examples/buggy_example.py --execute --model claude
209
+ iceni compare review --execute
210
+ ```
211
+
212
+ ```bash
213
+ # macOS / Linux
214
+ export ANTHROPIC_API_KEY="sk-ant-..."
215
+ iceni run review examples/buggy_example.py --execute --model claude
216
+ ```
217
+
218
+ ---
219
+
220
+ ## How the trust chain works
221
+
222
+ Every workflow carries a cryptographic signature so you always know who created it and that it hasn't been modified:
223
+
224
+ ```
225
+ "review" → local petname → aip:key:ed25519:… → signed intent (sha256) → per-model render
226
+ (human) (anti-mimicry) (identity) (Ed25519) (Claude/GPT/Kimi)
227
+ ```
228
+
229
+ The human-readable name is **not** the trust anchor. Trust rides on the Ed25519 key. A tampered alias will be rejected at `iceni import`.
230
+
231
+ ---
232
+
233
+ ## Benchmark results (honest)
234
+
235
+ We ran a 10-task offline benchmark against plain prompts. Key findings:
236
+
237
+ - **100% structured output** (ICENI) vs **0%** (plain prompts) on the Structure-Fidelity Score test
238
+ - **+7 points functional quality** on real code tasks (320–577 token inputs)
239
+ - **−3 to −6 points on tiny inputs** (<200 tokens) — ICENI's instruction overhead outweighs the benefit
240
+ - **Average delta: +1.55** — the real value is consistency and re-runs avoided, not a quality leap
241
+
242
+ Full results: [`benchmarks/report-10task-offline.md`](benchmarks/report-10task-offline.md)
243
+
244
+ ---
245
+
246
+ ## Project layout
247
+
248
+ ```
249
+ src/iceni/
250
+ cli.py all commands
251
+ mcp_server.py Claude Desktop / MCP integration
252
+ calibration.py per-model prompt renderer (Claude / GPT / Kimi)
253
+ discovery.py auto-discover recurring prompts from conversation logs
254
+ feedback.py outcome tracking + workflow evolution
255
+ trust/ Ed25519 signing, identity, keystore
256
+ store/ SQLite alias store + migrations
257
+ providers/ Anthropic · OpenAI · Kimi (openai-compat)
258
+ packs/ 19 JSON packs, 208 workflows
259
+ benchmarks/ 10-task benchmark, SFS test, offline results
260
+ examples/ intentionally-buggy demo code (for testing security-audit)
261
+ library/ CATALOG.md + pack builder
262
+ tests/ smoke, share, router, feedback, packs
263
+ site/ landing page (index.html)
264
+ ```
265
+
266
+ ---
267
+
268
+ ## Roadmap
269
+
270
+ - [x] Core CLI (`init`, `create`, `list`, `show`, `run`, `compare`, `export`, `import`)
271
+ - [x] Trust chain (Ed25519 signatures, content-addressed intents)
272
+ - [x] MCP server (Claude Desktop `+` → Connectors integration)
273
+ - [x] Claude Code skill (`/iceni`)
274
+ - [x] 208-workflow library (19 packs)
275
+ - [x] Auto-discovery (cluster recurring prompts from conversation logs)
276
+ - [x] Outcome tracking + usage stats
277
+ - [ ] PyPI release (`pip install iceni`)
278
+ - [ ] GPT / Kimi auto-calibration from live execution feedback
279
+ - [ ] Drift detection (alert when a workflow's output style shifts)
280
+ - [ ] Pack marketplace
281
+
282
+ ---
283
+
284
+ ## License
285
+
286
+ MIT — see [LICENSE](LICENSE)
287
+
288
+ ---
289
+
290
+ ## Contributing
291
+
292
+ Issues and PRs welcome. If you build a workflow pack worth sharing, open a PR against `library/build_library.py`.
iceni-0.1.0/README.md ADDED
@@ -0,0 +1,266 @@
1
+ # ICENI Protocol
2
+
3
+ [![CI](https://github.com/stevenjtobin/iceni-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/stevenjtobin/iceni-protocol/actions/workflows/ci.yml)
4
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
6
+ [![Workflows](https://img.shields.io/badge/workflows-208-orange)](library/CATALOG.md)
7
+ [![Platforms](https://img.shields.io/badge/tested%20on-Claude%20%7C%20ChatGPT%20%7C%20Kimi-blueviolet)](#which-ai-platforms-are-tested-and-working)
8
+
9
+ **Save your best AI instructions once. Use them everywhere — in one word.**
10
+
11
+ ICENI is a reusable-workflow system for AI assistants. You write an expert prompt once, give it a name (`review`, `security-audit`, `refactor`), and from then on that word is all you type. ICENI renders the right calibrated prompt for whichever model you're using — Claude, ChatGPT, or Kimi — and produces structured, consistent output every time.
12
+
13
+ It won't make the model smarter. It will save you from retyping the same 60-word instruction block a hundred times, get the answer right first time (no re-runs), and produce output that other tools and agents can parse reliably.
14
+
15
+ ---
16
+
17
+ ## Who is this for?
18
+
19
+ | Person | What ICENI does for them |
20
+ |---|---|
21
+ | **Developer** | `review`, `refactor`, `test-gen`, `security-audit` in every project — same structured output every time |
22
+ | **Writer / marketer** | `blog-outline`, `email-reply`, `summarize` with your house style baked in |
23
+ | **Analyst / researcher** | `research-brief`, `compare`, `decisions` with consistent format to feed into pipelines |
24
+ | **Team lead** | Export a signed alias, the whole team imports it — one standard, signature-verified |
25
+ | **Claude Code user** | `/iceni` inside Claude Code runs your full workflow library in the terminal |
26
+
27
+ ---
28
+
29
+ ## Which AI platforms are tested and working?
30
+
31
+ | Platform | Integration | Status |
32
+ |---|---|---|
33
+ | **Claude Desktop** | MCP server — workflows appear under `+` → Connectors → `iceni` | ✅ Tested |
34
+ | **Claude Code** | Skill (`/iceni`) + CLI via `python -m iceni` | ✅ Tested |
35
+ | **ChatGPT** | CLI with `--model gpt` (OpenAI API key required) | ✅ Tested |
36
+ | **Kimi (Moonshot)** | CLI with `--model kimi` (Moonshot API key required) | ✅ Tested |
37
+ | **Any OpenAI-compatible API** | Set `OPENAI_API_KEY` + base URL | Works offline, render only |
38
+ | **No AI at all** | `--preview` mode renders the prompt without calling any model | ✅ Works offline |
39
+
40
+ The core features — create, list, show, export, import — work **completely offline with no API keys**.
41
+
42
+ ---
43
+
44
+ ## Quickstart (5 minutes, no API key needed)
45
+
46
+ ### Prerequisites
47
+
48
+ - Python 3.10+
49
+ - pip
50
+ - Claude Desktop (for the `+` → Connectors integration) **or** Claude Code (for `/iceni`)
51
+
52
+ ### Step 1 — Install
53
+
54
+ ```bash
55
+ git clone https://github.com/stevenjtobin/iceni-protocol.git
56
+ cd iceni-protocol
57
+ pip install -e .
58
+ ```
59
+
60
+ Verify it works:
61
+ ```bash
62
+ iceni --version
63
+ iceni doctor
64
+ ```
65
+
66
+ ### Step 2 — Initialise your library
67
+
68
+ ```bash
69
+ iceni init
70
+ ```
71
+
72
+ This creates a local store in `~/.iceni/` (never committed, never shared).
73
+
74
+ > **Your data stays local.** ICENI makes no network calls unless you explicitly set an API key and run `--execute`. No telemetry, no cloud sync, no passive collection of your conversations. The auto-discovery command (`iceni discover`) is manual and opt-in — it reads your local Claude Code logs only when you ask it to, proposes candidates, and signs nothing until you approve. You can delete `~/.iceni/` at any time to reset completely.
75
+
76
+ ### Step 3 — Install a workflow pack
77
+
78
+ ```bash
79
+ iceni pack list # see all 19 packs (208 workflows)
80
+ iceni pack install code-quality-plus # install one pack
81
+ iceni pack install all # or install everything at once
82
+ iceni list # confirm they're there
83
+ ```
84
+
85
+ ### Step 4 — Connect to Claude Desktop (optional)
86
+
87
+ ```bash
88
+ iceni connect-desktop
89
+ ```
90
+
91
+ Restart Claude Desktop → click **`+`** (bottom-left) → **Connectors** → **`iceni`**. Your workflows appear. Pick one, paste your content, done.
92
+
93
+ > **Can't find it?** Make sure you restarted Claude Desktop after running `connect-desktop`. The `+` button is in the chat input bar, not the sidebar.
94
+
95
+ ### Step 5 — Try your first workflow
96
+
97
+ **In the terminal (no AI key needed — preview only):**
98
+ ```bash
99
+ iceni run review examples/buggy_example.py --preview --model claude
100
+ ```
101
+
102
+ **In Claude Desktop:** Click `+` → Connectors → `iceni` → choose `security-audit` → paste any code.
103
+
104
+ **In Claude Code:** Type `/iceni` and pick a workflow from the menu.
105
+
106
+ ---
107
+
108
+ ## The 208-workflow library
109
+
110
+ ICENI ships with 19 themed packs covering the most common AI tasks:
111
+
112
+ **Code packs** — `code-quality-plus`, `testing`, `refactoring`, `documentation`, `debugging`, `git-workflow`, `architecture-design`, `devops-deploy`, `lang-tools`
113
+
114
+ **Chat / writing packs** — `writing-pro`, `email-comms`, `research-analysis`, `business-strategy`, `marketing-content`, `learning-explain`, `decisions-planning`, `document-data`
115
+
116
+ See the full list: [`library/CATALOG.md`](library/CATALOG.md)
117
+
118
+ ```bash
119
+ iceni pack list # browse all packs
120
+ iceni pack install testing # install one
121
+ iceni list # see your installed workflows
122
+ iceni show review # inspect a workflow + signature
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Create your own workflow
128
+
129
+ ```bash
130
+ iceni create my-brief \
131
+ --goal "Write a one-page project brief from bullet points." \
132
+ --input "{{notes}}" \
133
+ --constraint "plain English, no jargon" \
134
+ --output-format "Problem / Approach / Outcome / Next steps" \
135
+ --hint "claude=use XML sections" \
136
+ --hint "gpt=use markdown headers"
137
+ ```
138
+
139
+ Each workflow gets an Ed25519 signature. When you share it, the recipient's `iceni import` verifies the signature before installing — tampered aliases are rejected.
140
+
141
+ ---
142
+
143
+ ## Share with your team
144
+
145
+ ```bash
146
+ iceni export review # → review.iceni (signed, portable)
147
+ # send review.iceni to a colleague
148
+ iceni import review.iceni # verified + installed on their machine
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Key commands
154
+
155
+ ```bash
156
+ iceni list # all installed workflows
157
+ iceni show <name> # prompt text + signature status
158
+ iceni run <name> <file> # render prompt for a file (--preview skips the API call)
159
+ iceni compare <name> # side-by-side Claude / GPT / Kimi renderings
160
+ iceni stats # your accumulated savings (words saved, re-runs avoided)
161
+ iceni pack list # browse all 19 packs
162
+ iceni pack install <name> # add a pack
163
+ iceni export <name> # portable signed alias file
164
+ iceni import <name>.iceni # verified install from a file
165
+ iceni connect-desktop # wire into Claude Desktop automatically
166
+ iceni mcp # start the MCP stdio server manually (for debugging)
167
+ iceni doctor # check config + which model keys are set
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Using API keys (live model calls)
173
+
174
+ ICENI works **without any API key** in `--preview` mode. To call models directly:
175
+
176
+ ```bash
177
+ # Windows PowerShell
178
+ $env:ANTHROPIC_API_KEY = "sk-ant-..."
179
+ $env:OPENAI_API_KEY = "sk-..."
180
+ $env:MOONSHOT_API_KEY = "..."
181
+
182
+ iceni run review examples/buggy_example.py --execute --model claude
183
+ iceni compare review --execute
184
+ ```
185
+
186
+ ```bash
187
+ # macOS / Linux
188
+ export ANTHROPIC_API_KEY="sk-ant-..."
189
+ iceni run review examples/buggy_example.py --execute --model claude
190
+ ```
191
+
192
+ ---
193
+
194
+ ## How the trust chain works
195
+
196
+ Every workflow carries a cryptographic signature so you always know who created it and that it hasn't been modified:
197
+
198
+ ```
199
+ "review" → local petname → aip:key:ed25519:… → signed intent (sha256) → per-model render
200
+ (human) (anti-mimicry) (identity) (Ed25519) (Claude/GPT/Kimi)
201
+ ```
202
+
203
+ The human-readable name is **not** the trust anchor. Trust rides on the Ed25519 key. A tampered alias will be rejected at `iceni import`.
204
+
205
+ ---
206
+
207
+ ## Benchmark results (honest)
208
+
209
+ We ran a 10-task offline benchmark against plain prompts. Key findings:
210
+
211
+ - **100% structured output** (ICENI) vs **0%** (plain prompts) on the Structure-Fidelity Score test
212
+ - **+7 points functional quality** on real code tasks (320–577 token inputs)
213
+ - **−3 to −6 points on tiny inputs** (<200 tokens) — ICENI's instruction overhead outweighs the benefit
214
+ - **Average delta: +1.55** — the real value is consistency and re-runs avoided, not a quality leap
215
+
216
+ Full results: [`benchmarks/report-10task-offline.md`](benchmarks/report-10task-offline.md)
217
+
218
+ ---
219
+
220
+ ## Project layout
221
+
222
+ ```
223
+ src/iceni/
224
+ cli.py all commands
225
+ mcp_server.py Claude Desktop / MCP integration
226
+ calibration.py per-model prompt renderer (Claude / GPT / Kimi)
227
+ discovery.py auto-discover recurring prompts from conversation logs
228
+ feedback.py outcome tracking + workflow evolution
229
+ trust/ Ed25519 signing, identity, keystore
230
+ store/ SQLite alias store + migrations
231
+ providers/ Anthropic · OpenAI · Kimi (openai-compat)
232
+ packs/ 19 JSON packs, 208 workflows
233
+ benchmarks/ 10-task benchmark, SFS test, offline results
234
+ examples/ intentionally-buggy demo code (for testing security-audit)
235
+ library/ CATALOG.md + pack builder
236
+ tests/ smoke, share, router, feedback, packs
237
+ site/ landing page (index.html)
238
+ ```
239
+
240
+ ---
241
+
242
+ ## Roadmap
243
+
244
+ - [x] Core CLI (`init`, `create`, `list`, `show`, `run`, `compare`, `export`, `import`)
245
+ - [x] Trust chain (Ed25519 signatures, content-addressed intents)
246
+ - [x] MCP server (Claude Desktop `+` → Connectors integration)
247
+ - [x] Claude Code skill (`/iceni`)
248
+ - [x] 208-workflow library (19 packs)
249
+ - [x] Auto-discovery (cluster recurring prompts from conversation logs)
250
+ - [x] Outcome tracking + usage stats
251
+ - [ ] PyPI release (`pip install iceni`)
252
+ - [ ] GPT / Kimi auto-calibration from live execution feedback
253
+ - [ ] Drift detection (alert when a workflow's output style shifts)
254
+ - [ ] Pack marketplace
255
+
256
+ ---
257
+
258
+ ## License
259
+
260
+ MIT — see [LICENSE](LICENSE)
261
+
262
+ ---
263
+
264
+ ## Contributing
265
+
266
+ Issues and PRs welcome. If you build a workflow pack worth sharing, open a PR against `library/build_library.py`.