# Changelog

## Unreleased

- Local provider preset now targets llama.cpp's OpenAI-compatible endpoint at
  `http://127.0.0.1:8080/v1` with `openbmb/minicpm5:latest`; the `ollama` preset
  remains as a backward-compatible alias.
- Local `llama_cpp` completions default to `512` tokens and clamp oversized
  calls through `SIMPLICIO_LOCAL_MAX_TOKENS_CAP` so fan-out workloads do not
  overrun the shared llama.cpp server.

## [1.14.1] — 2026-06-02 — Runtime contract surface alignment

### Changed
- Align PyPI package metadata and published runtime contract documentation with
  the current standard IO, mechanical-edit, and token-efficient schemas.

## [1.14.0] — 2026-06-02 — Contracts surface + governance + token-efficient prompts

Eleven backlog items shipped in a single sweep. All additions are
opt-in / additive; defaults preserve 1.13.x bit-for-bit, so this is a
semver-safe minor bump.

### Added
- **Runtime contracts package** (`contracts/`, closes #55) — top-level
  `manifest.json` plus JSON Schemas for `FanoutReport`, `ArenaReport`,
  `BehaviorConsensusResult`, `LocalAgentStatus`, `EscalationSignal`.
  Importable via `from contracts import load_manifest, load_schema`;
  npm consumers get `simplicio-prompt/contracts/manifest` +
  `/schemas/<name>` exports.
- **`simplicio.mechanical-edit/v1` prompt contract** (closes #70) —
  ONE-SHOT and BATCH teach planner/reviewer behaviour, refusal
  checklist, and corrected-JSON-plan flow against the canonical
  schema in `wesleysimplicio/simplicio-runtime#69`. Documented in
  `docs/mechanical-edit-prompt-contract.md`.
- **Token-efficient runtime contracts** (closes #74) — both prompts
  now recognise `simplicio.artifact-response/v1`,
  `simplicio.log-summary/v1`, `simplicio.diff-review/v1`,
  `simplicio.postconditions/v1`, `simplicio.retry/v1`, and
  `simplicio.model-routing/v1`. Typed artifacts (`Plan`, `EditPlan`,
  `TestPlan`, `ReviewDecision`, `FailureAnalysis`, `RetryRequest`)
  with worked examples in
  `docs/token-efficient-prompt-contracts.md`.
- **CLI arena / consensus surface** (closes #57) —
  `simplicio-subagents --mode {fanout,arena}` plus
  `--critic-provider`, `--critic-model`, `--M`. Arena writes
  `arena-report.json` / `arena-summary.md` under `--report-dir`.
- **`guardrails/` ships on PyPI** (closes #60) — `guardrails`
  package now in `[tool.setuptools].packages` plus `package-data`,
  so `from guardrails import cpu_throttle, disk_gc` works after
  `pip install simplicio-prompt`. `release.yml` smoke step verifies
  the import.
- **Repo governance** (closes #63) — `.github/ISSUE_TEMPLATE/`,
  `.github/PULL_REQUEST_TEMPLATE.md`, `SECURITY.md`, and
  `CODE_OF_CONDUCT.md`.
- **Phase 2 / Phase 3 documentation** (closes #58) — README sections
  describing `BehaviorConsensus` and `AdversarialPairs`, retroactive
  note in the 1.12.0 entry recording when the kernel modules
  actually landed.
- **`simplicio-edit` + `json-file-editor` README documentation**
  (closes #62).
- **Per-IDE plugin README clarifications** (closes #61) — every
  `plugins/<id>/README.md` now states the install is generated by
  `plugins/targets.mjs`; no static payload lives in those folders.

### Tests
- **Guardrails coverage** (closes #59) — `tests/test_guardrails.py`
  adds 45 cases for `cpu_throttle` and `disk_gc` with mocked
  `os.nice` / `time.sleep` / `shutil.disk_usage`.
- **Contracts coverage** — `tests/test_contracts.py` (13 cases)
  pins manifest shape, schema metadata, generic-role enum, and
  forward-compatibility (no root `additionalProperties: false`).
- **Mechanical-edit prompt coverage** —
  `tests/test_mechanical_edit_prompt.py` (20 cases) pins the
  canonical-schema references, activation triggers, refusal
  checklist, and CLI-6LAYER precedence.
- **Token-efficient prompt coverage** —
  `tests/test_token_efficient_prompts.py` (24 cases) pins every
  schema reference, every typed artifact, the operational rules,
  and section ordering (`CLI-6LAYER` > mechanical-edit >
  token-efficient).
- Full suite goes from **112 to 219 tests** (+107).

### Fixed / Closed without a code change
- **`dist/` and `*.egg-info/` tracking** (closes #64) — verified
  already untracked + gitignored; the issue's premise was based on
  a stale working tree.

### Notes
- No runtime dependencies added.
- `release.yml` smoke step now imports `guardrails` and
  `contracts` after the kernel version check, so any future change
  that drops them from the wheel fails the release.

## [1.13.3] — 2026-06-01 — README soul pass

### Changed
- Restored the original runtime and benchmark README guide under the new multilingual landing page.
- Added Project DNA notes to localized READMEs and updated the shared standard so future README globalization is additive, not destructive.

## [1.13.2] — 2026-06-01 — README globalization

### Changed
- Rebuilt the README around a benchmark-informed, multilingual product page with Star History, ecosystem graph, and proof-first ordering.
- Added canonical translations under `READMEs/` for English, Portuguese, Spanish, Japanese, Korean, Simplified Chinese, Italian, French, Russian, Polish, Hindi, Arabic, Hebrew, Malay, and Indonesian.
- Documented the shared Simplicio README globalization standard.

All notable changes to `simplicio-prompt` are documented here.
Format roughly follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
versioning is [SemVer](https://semver.org/).

## [1.13.1] — 2026-06-01 — Local Ollama default

### Changed
- `local` / `ollama` provider presets now default to
  `openbmb/minicpm5:latest` on `http://127.0.0.1:8080/v1`.
- This aligns prompt fan-out defaults with the Simplicio ecosystem local LLM
  policy; remote providers remain explicit selections.

## [1.13.0] — 2026-06-01 — Adaptive fan-out reports

### Added
- CLI fan-out profiles: `--fanout-profile quick` (32), `standard` (200),
  `max` (600), and `auto`, while keeping explicit `--subagents N` as the
  strongest override.
- Wide fan-outs now auto-enable diversified prompt personas by default, with
  `--no-auto-diversify` available for exact identical-prompt experiments.
- `--report-dir` writes reusable single-run artifacts
  (`fanout-report.json`, `fanout-summary.md`) and batch artifacts
  (`batch-results.ndjson`, `batch-summary.md`) for orchestrators and review.

### Changed
- Product documentation now describes real-stack evidence routing as a generic
  package capability, without downstream project names or repository-specific
  context.

## [1.12.3] — 2026-05-31 — Real-stack evidence routing

### Added
- `requires_real_stack_evidence()` detects Playwright + UI + API + PostgreSQL
  evidence requests and routes them through analysis mode.
- ONE-SHOT and BATCH prompts now document the real-stack evidence protocol:
  mapper first, dev-cli/sprint scope routing, real services, focused
  Playwright artifacts, and exact validation/commit evidence.

## [1.12.2] — 2026-05-31 — Analysis routing

### Added
- `is_analysis_goal()` and `execution_mode_for_goal()` now expose a reusable
  routing decision for inventory/mapping/alignment work versus direct delivery
  work. This lets SendSprint and simplicio-cli share the same analysis-first
  prompt mode for cross-repo endpoint alignment tasks.

## [1.12.1] — 2026-05-30 — Mapper context artifacts

### Added
- Commit `.simplicio/project-map.json` and `.simplicio/precedent-index.json`
  so downstream LLM executions can load the repository map directly.

## [1.12.0] — 2026-05-29 — SendSprint batch JSONL + Phase 2 + Phase 3 kernel

### Added (retroactive note)

The 1.12.0 release line carried both the SendSprint batch JSONL CLI flow
listed below **and** the kernel landings for **Phase 2 — behavior consensus
aggregator** (#30) and **Phase 3 — adversarial pairs** (#31) from the
roadmap epic (#28). Documenting them here so the CHANGELOG reflects
when the capability shipped:

- **`kernel/aggregator.py::BehaviorConsensus`** — oracle-driven modal-vote
  (Phase 2). Takes N candidates and an `oracle_fn(code) -> dict[str, bool]`,
  returns a `BehaviorConsensusResult` with `index`, `profile`,
  `passed_tests`, `failed_tests`, `broken_tests`, `coverage`, and
  `consensus_score`. If any candidate passes every observed test it wins
  outright; otherwise selection is by alignment with the majority-pass
  subset. Exposed through `SubagentRuntime.run(aggregator="behavior",
  oracle=...)`.
- **`kernel/arena.py::AdversarialPairs`** — M implementer + M critic
  arena selection (Phase 3). Takes a generator `LLMProvider`, a critic
  `LLMProvider`, optional `oracle_fn` for a Phase 2 double gate. Returns
  `ArenaReport` with `attempts`, `reviews`, `winner_index`, and a
  `winner` property. Exposed through `SubagentRuntime.run(mode="arena",
  M=..., critic_provider=...)`.

These were the mechanism behind the headline `12/12 PHPUnit` result on
`qwen-coder-next-instruct` documented in the README "Scope" section, but
were never given a dedicated changelog line at the time.

### Added
- `simplicio-prompt --batch tasks.jsonl --subagents N --json` batch execution
  mode for SendSprint fan-out. It reuses one provider/runtime boot for many
  task prompts, emits one NDJSON result per input line, preserves `task_id`,
  honors existing runtime flags such as `--dry-run`, `--provider`, `--model`,
  `--subagents`, `--no-cache` and `--diversify`, and keeps processing after
  malformed lines or per-task errors.

## [1.11.0] — 2026-05-29 — Phase 1 + integration + infra

Roadmap **Phase 1 (Diverse-prompt fan-out)** kernel-side delivery plus the
tech-debt and infrastructure work that landed alongside it. All new
runtime parameters are opt-in; defaults preserve the 1.10.x behavior
bit-for-bit, so this is a semver-safe minor bump.

### Added
- **`kernel.diversifier`** (Phase 1) — `Persona`, `PromptDiversifier`, and
  `make_diversified_prompt_builder` for deterministic persona-based prompt
  variants. 4 framings × 3 emphases × 3 host-code stances = 36 unique
  combinations; for N > 36, base personas cycle with a rotation counter
  folded into the slug so the input bytes still differ on every pass.
  Closes #29 (kernel side; output-side validation pending bench in
  `simplicio-dev-cli`).
- **`SubagentRuntime.run(diversify=True, diversify_seed=0)`** — opt-in
  flag that wraps the prompt builder so each subagent's `system` message
  is prepended with a unique persona directive. The `prompt` field stays
  intact, so structured contracts (e.g. simplicio-cli `[CLI-6LAYER]`)
  compose cleanly.
- **`SubagentRuntime.run(overall_timeout_s=...)`** — global wall-clock
  timeout for the entire fan-out. Env-var fallback
  `YOOL_TUPLE_OVERALL_TIMEOUT_S`. Closes #35.
- **`FanoutReport.status`** — `"ok"` | `"timeout"`. Carried through
  `to_dict()` and `format_summary()` (`[TIMEOUT]` prefix when not ok).
- **CLI flags:** `--diversify`, `--diversify-seed`, `--overall-timeout-s`.
- **`tests/test_diversifier.py`** — 22 tests pinning slug format,
  rotation, base catalog completeness, n=1/36/37/200 sizes, determinism,
  seed permutation, wrapped-builder semantics, empty-system handling.
- **`tests/targets.test.mjs`** — 13 unit tests blindando the multi-IDE
  plugin registry (`plugins/targets.mjs`). Closes #36.
- **`benchmarks/diversifier_benchmark.py`** — input-side uniqueness lift
  measurement (200x in the realistic static-contract case).
- **`.github/workflows/tests.yml`** + **`.github/workflows/release.yml`** —
  matrix CI (Python 3.10/3.11/3.12) on push/PR, and a tag-driven release
  pipeline that does the cross-version check + PyPI/npm publish + smoke
  verify automatically. Closes #33.
- **`CONTRIBUTING.md`** — canonical local-dev, release, and prompt-edit
  flow. Closes #38.

### Changed
- **`kernel/utils` is now actually wired into the runtime hot paths**:
  - `kernel/yool_tuple_kernel.py::ReceiptCache` consolidated into
    `kernel/utils/cache.py::TTLCache` (BC alias preserved).
  - `kernel/yool_tuple_kernel.py::_stable_digest` delegates to
    `kernel.utils.serialization.stable_digest`.
  - `kernel/providers.py` JSON I/O routes through
    `kernel.utils.serialization.{dumps_bytes, loads}` — `pip install orjson`
    now silently accelerates the runtime. Closes #32.

### Fixed
- **`bin/simplicio-prompt.mjs::loadVersion`** no longer silently returns
  `"0.0.0"` on corrupted `package.json`; it logs the reason to stderr
  before falling back. Top-level catch falls through `e.message ||
  String(e)` so non-Error throws never print the literal `"undefined"`.
  Closes #37.

## [1.10.1] — 2026-05-29 — Phase 0: ONE-SHOT template hygiene

Roadmap **Phase 0 (Hygiene + repositioning)** — see `Roadmap to v2.0` in the
project board. Goal: stop sp from regressing vs cli alone on ≤8B models in
single-call and align the public narrative with the bench evidence.

### Changed
- **`prompts/agent-runtime-execution-prompt.md`** (ONE-SHOT template):
  - Hoisted the "Compose with simplicio-cli" guidance to the top of the
    `## Prompt` body so the model anchors to the contract-shaped framing
    before reading anything else (Patch A).
  - Dropped the "Stop conditions" section — the imperative reminder at the
    end of the template already enforces the same constraint without
    re-introducing the words "fan-out / tuple graph / subagents" near the
    tail, which mid-tier models sometimes echoed (Patch B).
  - Patches C (anti-ceremony reminder at close) and D (`[CLI-6LAYER]`
    marker handling) confirmed already present from the previous release.
- **`README.md`**: rewrote the "Scope" framing — drops the implicit
  single-call performance claim, repositions sp as the **fan-out runtime**
  (where the empirical wins live) and cli as the **task contract**, and
  cites the `Coder-Next 12/12 PHPUnit` fan-out result as the headline
  differentiator.

### Notes
- No behavioral change for BATCH / fan-out consumers.
- Validation criterion (run on `simplicio-dev-cli`): re-run
  `bench/run_exec_sindico.py` with the 4 models in the previous batch and
  confirm `cli + sp v1.10.1` does **not regress any case** vs `cli` alone.

## [1.10.0] — 2026-05-29 — Internal version alignment

### Fixed
- Aligned `pyproject.toml` and `kernel/__init__.py` with `package.json` at
  `1.10.0` (they had been left at `1.9.0` by the previous CLI-contract-
  precedence commit). PyPI now reflects the same version as the npm
  manifest.

## [1.9.0] — 2026-05-28

### Added
- **Cache layer** for prompt patterns and guardrails: `utils/prompt-cache.mjs`
  (npm) plus `kernel/utils/cache.py` (`TTLCache`) and
  `kernel/utils/serialization.py` (`orjson` opt-in + fallback +
  `stable_digest`). Closes Issue #20.
- **Optional Rust acceleration via PyO3** (`rust/` crate + `kernel/utils/accel.py`
  with pure-Python fallback). Build locally with `cd rust && maturin develop
  --release`. Closes Issue #22. Wheel still pure-Python on PyPI.

## [1.8.0] — 2026-05-28

### Changed
- Default `--subagents` fan-out raised from `64` → `200` based on empirical
  results; `600` remains as opt-in for max-breadth audits.

## [1.7.0] — 2026-05-28

### Added
- **Physical split of ONE-SHOT vs BATCH templates**
  (`prompts/agent-runtime-execution-prompt.md` for ONE-SHOT default;
  `prompts/agent-runtime-batch.md` for opt-in BATCH). Hook reads
  `YOOL_TUPLE_FULL_RUNTIME=1` to switch directives. Closes the bench
  finding that the BATCH content was biasing single-artifact outputs.

## [1.6.0] — 2026-05-28

### Added
- ONE-SHOT vs BATCH mode selection text inside the template.
- Real-subagent shell invocation guidance (`simplicio-subagents` CLI).

## [1.5.0] — 2026-05-28 — First PyPI release

### Added
- Initial PyPI publication of the Python kernel
  (`pip install simplicio-prompt`). Relicensed from proprietary → MIT.
- Console script `simplicio-subagents` for real fan-out on
  DeepSeek / MiMo / OpenRouter / local llama.cpp.
- `pyproject.toml` + `kernel/__init__.py` packaging.

## [< 1.5.0]

See git history for releases prior to PyPI publication.
