Skip to main content

Deterministic capability-selection gate: select one safe, evidence-bound capability path or fail closed.

Project description

ChoiceGate logo

ChoiceGate

ChoiceGate is a seven-skill atomic family that selects one safe capability path from frozen, evidence-bound candidates. It returns a deterministic receipt or fails closed; it does not execute, install, authorize, authenticate, or configure the selected capability.

Lifecycle eligibility and routing priority remain owned by an external capability registry. ChoiceGate binds to one owner-accepted registry snapshot by content hash and never mutates it. The local 0.1.0 version is preparation metadata, not a marketplace entry, installation, or lifecycle claim.

Atomic family

Canonical skill One measurable outcome
choicegate Select one domain leaf or return no safe route.
choicegate-skills Select one eligible skill or approved skill bundle.
choicegate-tools Select one eligible local executable or deterministic utility.
choicegate-integrations Select one integration path or owner-gated setup receipt.
choicegate-generators Select one generation capability without calling it.
choicegate-context Select one measured context intervention within budget.
choicegate-refresh Decide whether evidence remains fresh or rerouting is required.

The historical discover-better-tools name is retained only as an explicit compatibility alias. It does not own natural-language routing and cannot outrank a canonical ChoiceGate skill.

Why the gate exists

Capability selection is a policy decision, not a search-results list. ChoiceGate applies lifecycle eligibility, authorization, surface compatibility, evidence freshness, tool cost, and deterministic tiebreaks before returning one path. Ambiguous ownership, stale evidence, malformed JSON, duplicate keys, or an ineligible surface produces a typed failure or no-safe-route receipt.

flowchart LR
  A["Typed request"] --> B["Frozen candidate evidence"]
  B --> C{"Exactly one eligible owner?"}
  C -- "No" --> D["Fail closed / no safe route"]
  C -- "Yes" --> E["Deterministic decision receipt"]
  E --> F{"Separate execution approval?"}
  F -- "No" --> G["Stop"]
  F -- "Later" --> H["Selected workflow executes elsewhere"]

Local proof

The repository ships a standalone, offline test suite covering the family dispatcher, all seven atomic owners, trigger and near-miss fixtures, pairwise domain collisions, strict JSON duplicate-key rejection, receipt hashing, surface-adapter hash bindings, packaging metadata, and deterministic package contents:

python -B -m unittest discover -s tests -p "test_*.py"
python -B -m py_compile scripts/*.py tools/*.py

A stronger authority-bound suite validates the router against the exact owner-accepted capability-registry snapshot pinned in references/routing-contract.md. That snapshot is not part of this repository, so the authority-bound suite runs in the maintainer's environment; see docs/public/VALIDATION.md.

Demo

ChoiceGate returns one receipt and stops before execution

The demo uses the real local test result and contains no owner path, credential, remote claim, or fabricated usage metric.

Packaging

pyproject.toml packages the shared routing core as the choicegate Python distribution (version 0.1.0, MIT) using the deterministic, dependency-free in-tree backend in tools/choicegate_backend.py:

python -B -m build --no-isolation
python -B -m twine check dist/*

The repository also carries family-level choicegate manifests for Claude Code and Codex. Both surface packages reuse the same neutral skills, scripts, schemas, and references, and are built offline and deterministically:

python -B tools/build_surface_packages.py --output dist

No marketplace entry is created; surface activation remains a separate registry lifecycle decision.

Closed actions

This project does not create or change a remote, fetch, pull, push, query a marketplace or registry, authenticate, call a provider, install or enable a plugin, activate or promote a skill, or delete anything. Selection is never execution.

Governance

ChoiceGate is available under the MIT License. Contributions follow CONTRIBUTING.md, the Code of Conduct, and private security reporting guidance. Planned work and public-launch gates are in ROADMAP.md.

Built by Rahul Krishna.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

choicegate-0.1.0.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

choicegate-0.1.0-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

File details

Details for the file choicegate-0.1.0.tar.gz.

File metadata

  • Download URL: choicegate-0.1.0.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for choicegate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0e872c3f4710448fa3f1a81ff75cb9b86d322edf6baca0b230f3cfcbc720b24b
MD5 6dc93de1064e237fb9d22b09a8139f24
BLAKE2b-256 1e268458c01dfda49fb35b6f494883094b7c0e0c414dc2cbfdaf4e96bd04e49d

See more details on using hashes here.

File details

Details for the file choicegate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: choicegate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for choicegate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64e6d8cabc00a473c7178ca75194e3806491cd8284959bf9dd46e66f67380fa5
MD5 b9cb98cc91d055e43a27cd14302f6dd2
BLAKE2b-256 b68a80fdcf211302fb514f8f625bcae09408c289f3f2b122cfe87c837370e7dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page