simplicio-prompt 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ Copyright (c) 2026 Wesley Simplicio. All rights reserved.
2
+
3
+ This software and its documentation (the "Work") are proprietary and
4
+ confidential. The Work is provided for internal use only by Wesley
5
+ Simplicio and explicitly authorized collaborators.
6
+
7
+ No part of the Work may be reproduced, distributed, transmitted, modified,
8
+ or used in derivative works, in whole or in part, without prior written
9
+ permission from the copyright holder.
10
+
11
+ THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL
14
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR
15
+ OTHER LIABILITY ARISING FROM USE OF THE WORK.
package/README.md ADDED
@@ -0,0 +1,173 @@
1
+ # simplicio-prompt
2
+
3
+ ![simplicio-prompt — AI with 1,000,000+ subagents](docs/assets/simplicio-prompt-hero.png)
4
+
5
+ > Capability-addressing pattern: **yool** (atomic action) wrapped in **tuples** (addressable envelopes) over an **HAMT** (Hash Array Mapped Trie) registry, coordinated through a **tuple-space** with **content-addressable receipts**.
6
+
7
+ This repo is the canonical spec. Vendor it into any project that wants the pattern.
8
+
9
+ ## V2 safe-speed infographics
10
+
11
+ ### English
12
+ ![YOOL V2 Safe-Speed Runtime infographic in English](docs/assets/yool-v2-safe-speed-infographic-en.png)
13
+
14
+ ### Portuguese Brazil
15
+ ![Infografico YOOL V2 Safe-Speed Runtime em portugues](docs/assets/yool-v2-safe-speed-infographic-pt.png)
16
+
17
+ ### Texto de explicacao do infografico
18
+
19
+ The infographics compare a loose prompt flow against the `simplicio-prompt` V2
20
+ safe-speed runtime. The left side shows the old failure modes: flat agent lists,
21
+ sequential work, repeated provider calls, no cache, fixed concurrency, retry
22
+ storms, large LLM context, and weak audit trails.
23
+
24
+ The right side shows the V2 path: tuple-space routing, lazy `batch_spawn`,
25
+ adaptive `LaneWorkerPool`, receipt/input cache, small-task batching, circuit
26
+ breakers, backoff with jitter, context compression, local yool routing, and
27
+ speculative execution only for idempotent work. The practical result is faster
28
+ delivery through avoided repeat work and safer provider behavior, not through
29
+ unbounded calls.
30
+
31
+ Measured V2 benchmark highlights:
32
+
33
+ - Scale representation: `2,833.75x` faster than a normal instruction flow.
34
+ - Active execution: `26.93x` faster than normal sequential execution.
35
+ - Cache: `4x` fewer provider calls, a `75%` reduction.
36
+ - Batching: `32x` fewer small-task calls, a `96.88%` reduction.
37
+ - Circuit breaker: `64x` fewer failure attempts, a `98.44%` reduction.
38
+ - Token economy: `76.32%` estimated savings through context compression.
39
+
40
+ ## Quick read
41
+
42
+ - `YOOL_TUPLE_HAMT.md` — full spec with diagrams, algorithms, examples, guardrails.
43
+ - `kernel/yool_tuple_kernel.py` — reference Python kernel with lazy `batch_spawn`,
44
+ `compress_token`, hookwall, indexed tuple-space scans, and lane worker fan-out.
45
+ - `prompts/agent-runtime-execution-prompt.md` — ready prompt for Claude, Codex,
46
+ Hermes, and other coding agents.
47
+ - `examples/` — runnable minimal implementations (Python, Node).
48
+ - `guardrails/` — CPU throttle + disk GC reference implementations.
49
+ - `adopters.md` — projects that vendor this spec.
50
+
51
+ ## How to use the prompt
52
+
53
+ Use `simplicio-prompt` as a canonical execution prompt for coding agents such as
54
+ Claude, Codex, Hermes, Cursor, Cline, or any assistant that can read repository
55
+ instructions.
56
+
57
+ 1. Open [`prompts/agent-runtime-execution-prompt.md`](prompts/agent-runtime-execution-prompt.md).
58
+ 2. Copy the full `## Prompt` section into the target agent instructions. Good
59
+ places are `AGENTS.md`, `CLAUDE.md`, a custom system prompt, or the first
60
+ message of a new implementation session.
61
+ 3. In the target repository, ask for work using a direct instruction such as
62
+ `Implement X`, `Fix X`, or `Build X`.
63
+ 4. The agent should read the canonical files listed in the prompt, decompose the
64
+ task into a Hilbert-indexed tuple graph, create a root tuple, route active
65
+ work through tuple-space primitives, and use `LaneWorkerPool` plus the V2
66
+ safe-speed controls.
67
+ 5. Keep the output shape stable so progress is easy to audit:
68
+
69
+ ```text
70
+ [Tuple Space Snapshot]
71
+ [Active Agents/Subagents]
72
+ [Total Agents/Subagents]
73
+ [Proximo Yool a executar]
74
+ [Resultado parcial]
75
+ ```
76
+
77
+ For high-throughput local runs, set the runtime environment variables before
78
+ starting the agent or scripts:
79
+
80
+ ```powershell
81
+ $env:YOOL_TUPLE_LANE_CONCURRENCY="32"
82
+ $env:YOOL_TUPLE_MAX_LANE_CONCURRENCY="64"
83
+ $env:YOOL_TUPLE_CPU_QUOTA_PCT="95"
84
+ $env:YOOL_TUPLE_QUEUE_MAXSIZE="8192"
85
+ $env:YOOL_TUPLE_COMPRESSION_THRESHOLD="1024"
86
+ $env:YOOL_TUPLE_CACHE_MAX_ENTRIES="16384"
87
+ $env:YOOL_TUPLE_CACHE_TTL_S="3600"
88
+ $env:YOOL_TUPLE_API_MAX_RETRIES="3"
89
+ $env:YOOL_TUPLE_API_BACKOFF_BASE_MS="100"
90
+ $env:YOOL_TUPLE_API_BACKOFF_MAX_MS="5000"
91
+ $env:YOOL_TUPLE_CIRCUIT_FAILURE_THRESHOLD="5"
92
+ $env:YOOL_TUPLE_CIRCUIT_COOLDOWN_S="30"
93
+ $env:YOOL_TUPLE_BATCH_SMALL_TASK_SIZE="32"
94
+ $env:YOOL_TUPLE_CONTEXT_COMPRESSION_CHARS="6000"
95
+ ```
96
+
97
+ Run the reference kernel and tests:
98
+
99
+ ```bash
100
+ python kernel/yool_tuple_kernel.py
101
+ python -m unittest discover -s tests -p "test_*.py"
102
+ ```
103
+
104
+ ## V2 benchmark report
105
+
106
+ The V2 report is the main evidence for the safe-speed runtime. Read it before
107
+ adopting the prompt in another project:
108
+
109
+ - [V2 Markdown report](benchmarks/v2_safe_speed_results.md)
110
+ - [V2 PDF report](benchmarks/v2_safe_speed_benchmark.pdf)
111
+ - [V2 benchmark script](benchmarks/v2_safe_speed_benchmark.py)
112
+ - [V2 PDF generator](benchmarks/generate_v2_benchmark_pdf.py)
113
+
114
+ What the V2 report shows:
115
+
116
+ - `2,833.75x` faster scale representation than normal instruction flow.
117
+ - `26.93x` faster active execution than normal sequential execution.
118
+ - `4x` fewer repeated provider calls through receipt/input cache.
119
+ - `32x` fewer small-task calls through batching.
120
+ - `64x` fewer provider failure attempts through circuit breakers.
121
+ - `76.32%` estimated token savings through context compression.
122
+
123
+ The key point: V2 speeds up by avoiding repeated work and controlling provider
124
+ pressure. It does not depend on unsafe infinite calls, unbounded concurrency, or
125
+ retry storms.
126
+
127
+ ## High-throughput runtime defaults
128
+
129
+ The reference kernel is tuned for speed while keeping host guardrails explicit:
130
+
131
+ | Env var | Default | Purpose |
132
+ |---|---:|---|
133
+ | `YOOL_TUPLE_LANE_CONCURRENCY` / `YOOL_LANE_CONCURRENCY` | `32` | Preferred workers per lane. |
134
+ | `YOOL_TUPLE_MAX_LANE_CONCURRENCY` / `YOOL_MAX_LANE_CONCURRENCY` | `64` | Ceiling for workers per lane. |
135
+ | `YOOL_TUPLE_CPU_QUOTA_PCT` / `YOOL_CPU_QUOTA_PCT` | `95` | Default per-yool CPU budget. |
136
+ | `YOOL_TUPLE_QUEUE_MAXSIZE` / `YOOL_QUEUE_MAXSIZE` | `8192` | Lane queue scan cap. |
137
+ | `YOOL_TUPLE_COMPRESSION_THRESHOLD` / `YOOL_COMPRESSION_THRESHOLD` | `1024` | Active materialized agents before pruning. |
138
+ | `YOOL_TUPLE_CACHE_MAX_ENTRIES` / `YOOL_CACHE_MAX_ENTRIES` | `16384` | Receipt/input-hash cache size. |
139
+ | `YOOL_TUPLE_CACHE_TTL_S` / `YOOL_CACHE_TTL_S` | `3600` | Cache TTL in seconds. |
140
+ | `YOOL_TUPLE_API_MAX_RETRIES` / `YOOL_API_MAX_RETRIES` | `3` | Retry budget for transient API/LLM failures. |
141
+ | `YOOL_TUPLE_API_BACKOFF_BASE_MS` / `YOOL_API_BACKOFF_BASE_MS` | `100` | Initial jittered backoff delay. |
142
+ | `YOOL_TUPLE_API_BACKOFF_MAX_MS` / `YOOL_API_BACKOFF_MAX_MS` | `5000` | Backoff ceiling. |
143
+ | `YOOL_TUPLE_CIRCUIT_FAILURE_THRESHOLD` / `YOOL_CIRCUIT_FAILURE_THRESHOLD` | `5` | Failures before opening provider breaker. |
144
+ | `YOOL_TUPLE_CIRCUIT_COOLDOWN_S` / `YOOL_CIRCUIT_COOLDOWN_S` | `30` | Provider cooldown after breaker opens. |
145
+ | `YOOL_TUPLE_BATCH_SMALL_TASK_SIZE` / `YOOL_BATCH_SMALL_TASK_SIZE` | `32` | Default small-task batch size. |
146
+ | `YOOL_TUPLE_CONTEXT_COMPRESSION_CHARS` / `YOOL_CONTEXT_COMPRESSION_CHARS` | `6000` | Large LLM context compression threshold. |
147
+
148
+ Safe speedups now live in the kernel, not only in the prompt: receipt/input
149
+ cache, adaptive lane concurrency, jittered backoff, provider circuit breakers,
150
+ small-task batching, prompt/context compression, local yool routing, and
151
+ speculative execution only for tuples marked `idempotent=True`.
152
+
153
+ Run the reference kernel and tests:
154
+
155
+ ```bash
156
+ python kernel/yool_tuple_kernel.py
157
+ python -m unittest discover -s tests -p "test_*.py"
158
+ ```
159
+
160
+ Benchmark reports:
161
+
162
+ - [Prompt vs normal Markdown](benchmarks/prompt_vs_normal_results.md)
163
+ - [Prompt vs normal PDF](benchmarks/prompt_vs_normal_benchmark.pdf)
164
+ - [V2 safe-speed Markdown](benchmarks/v2_safe_speed_results.md)
165
+ - [V2 safe-speed PDF](benchmarks/v2_safe_speed_benchmark.pdf)
166
+
167
+ ## Why a separate repo
168
+
169
+ The pattern is cross-project. SendSprint, llm-project-mapper, future agents — all consume the same spec. One source of truth, vendored on demand.
170
+
171
+ ## License
172
+
173
+ Private. Internal use only.