Metadata-Version: 2.4
Name: ctxwitch
Version: 0.3.3
Summary: Behavioral risk analysis for AI agent changes. Scan changes to prompts, models, tools, RAG, memory, and guardrails; classify behavioral risk and gate CI before deployment.
Author: ctxwitch
Author-email: Amey Kulkarni <amey.inbox@gmail.com>
License: 
                                         Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright 2026 Amey Kulkarni
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
        
Keywords: ai,context,versioning,llm,prompt-management,a2a,agents
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Software Development :: Version Control
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: click>=8.1
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: gitpython>=3.1
Requires-Dist: jsonschema>=4.17
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Dynamic: license-file

<h1 align="center">
  <img src="https://raw.githubusercontent.com/ctxwitch/ctxwitch/main/docs/ctxwitch-wordmark.png" width="440" alt="ctxwitch" />
</h1>

<p align="center"><b>Scan AI agent changes for behavioral risk</b></p>

<p align="center">
<a href="https://doi.org/10.5281/zenodo.20741295"><img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.20741295-blue" alt="DOI" /></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green" alt="License" /></a>
<a href="pyproject.toml"><img src="https://img.shields.io/badge/python-3.9%2B-blue" alt="Python" /></a>
<a href="tests/"><img src="https://img.shields.io/badge/tests-184%20passing-brightgreen" alt="Tests" /></a>
</p>

ctxwitch analyzes changes to your agent's prompts, models, tools, RAG, memory, and guardrails — before they ship — and classifies the behavioral risk of each change. Git tells you *what changed*; ctxwitch tells you what the change will *do*.

Remove a guardrail or reverse a rule and it flags the change **Breaking** and tells your CI a deeper eval or human review is warranted — while cosmetic edits pass clean.

Runs locally or as a GitHub Action, in ~100ms, deterministically — no agent execution, no traces, no LLM required. *(An optional LLM judge handles the subjective cases.)*

![witch tour demo — a prompt edit scored as a behavioral change across 12 dimensions](https://raw.githubusercontent.com/ctxwitch/ctxwitch/main/docs/demo.gif)

## Try it in 3 minutes

```bash
pip install ctxwitch
witch tour
```

The tour drops you into a disposable sandbox agent and walks you through the
whole loop — behavioral diff, commit, branch, a Breaking change, a Context PR,
and the eval gate that blocks it. Everything runs locally; no API key needed.

ctxwitch is the reference implementation of [Context Change Impact Analysis (CCIA)](https://doi.org/10.5281/zenodo.20741295) — a discipline for predicting how changes to an AI agent's context configuration affect its observable behavior. The core engine, CBIA (Compound Behavioral Impact Analysis), is a 6-tier pipeline that scores any context change across 12 behavioral dimensions at 5 severity levels, deterministically, in under 100ms, without LLM inference.

## The Problem

AI agent behavior is no longer defined by code alone. Prompts, model settings, tool definitions, RAG, memory, and guardrails all change how an agent behaves -- and those changes are increasingly made not just by engineers, but by product managers, domain experts, and security/compliance stakeholders.

Teams can already *version* and *test* these changes. What they lack is a fast, consistent way to understand the **behavioral risk** of a change *before* deciding how much testing or review it needs.

Today a one-word prompt tweak and a removed guardrail flow through the same pipeline -- even though their consequences are radically different. So teams over-test everything, under-test the risky changes, or fall back on manual judgment about what deserves a deeper look.

## The Solution

ctxwitch adds a **behavioral-risk analysis layer** before evaluation and deployment. It analyzes each change to an agent's context, classifies which behavioral dimensions are affected and how severely, and routes higher-risk changes to deeper testing or human review -- while low-risk edits pass straight through.

```
WITHOUT ctxwitch                 WITH ctxwitch
-------------------------------  --------------------------------
Every change tested the same  ->  Risk scored first; testing scaled to it
A prompt tweak == a guardrail ->  Severity + dimensions classified per change
Risky edits slip through      ->  Higher-risk changes routed to review
No semantic review            ->  The right reviewer sees the exact behavior diff
```

## No rewrite required: scan your existing agent code

Already have an agent built with Google ADK, LangGraph, or the raw
Anthropic/OpenAI SDK? You don't have to move anything into witch.yaml to get a
behavioral diff. `witch scan` reads the **behavioral surface** — system prompt,
model, temperature, tools, guardrails — straight out of your Python and runs
CBIA on it.

```bash
# Show what ctxwitch extracts from your agent (no code changes)
witch scan agent.py

# Score the behavioral impact of your uncommitted changes vs a git revision
witch scan agent.py --diff HEAD~1     # exit code 2 if the change is Breaking
```

The scan is **static** — it reads your code, it never imports or runs it, so
it's safe in CI on untrusted PRs. It follows prompt values assigned to module
constants, pulls each tool's description from its function docstring, and — this
is the important part — is **honest about what it can't resolve**. If a prompt is
built at runtime (an f-string, or loaded from witch.yaml), scan marks that field
`unresolved` rather than guessing, so a green result never hides a change it
simply couldn't see.

That gives you two clean ways in, for two stages of adoption:

| Where your prompt/config values live | Diff with | Get |
|---|---|---|
| In your **agent code** (inline or constants) | `witch scan --diff` | Zero-rewrite CBIA on your existing repo |
| In **witch.yaml** (code references it) | `witch diff` | Full governance: environments, PRs, rollback |

Start by scanning your code today; graduate to witch.yaml when you want the full
review workflow below.

## Behavioral scans on every PR (GitHub Action)

Add ctxwitch to CI and every pull request gets a behavioral-impact comment — the
severity of each change, the dimension it affects, and whether it should block.
Copy [docs/examples/behavioral-scan.yml](docs/examples/behavioral-scan.yml) into
`.github/workflows/` in your repo:

```yaml
name: Agent behavioral scan
on: pull_request
permissions:
  contents: read
  pull-requests: write
jobs:
  ctxwitch:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
        with:
          fetch-depth: 0        # required: gives the action the PR base to diff
      - uses: ctxwitch/ctxwitch@v0
        with:
          fail-on: breaking     # breaking | significant | minor | never
```

The PR comment looks like:

> **5 behavioral changes detected** across 2 scanned files.
>
> | Severity | Change | Dimension | Recommended |
> |---|---|---|---|
> | 🔴 Breaking | Constraints removed: Never give investment advice. | Constraints | requires human / security review |
> | 🟠 Significant | Escalation rule reversed: must escalate → may approve | Constraints | run evaluation suite / agent replay |
> | 🟢 Cosmetic | tone wording changed | Tone | no additional testing |
>
> **Policy result:** ❌ merge blocked (Breaking change)

**It runs entirely in your CI.** The scan uses your own git history and your own
`GITHUB_TOKEN` to post the comment — ctxwitch sends **no telemetry**, needs no
account, and nothing (no prompts, no code) ever leaves your infrastructure.

Prefer to wire it into your own pipeline? `witch ci` is the underlying command:

```bash
witch ci --base origin/main --fail-on breaking      # exits 2 if blocked
witch ci --base origin/main --format json           # machine-readable
```

## A shared language for cross-functional changes

Agent behavior is increasingly a cross-functional artifact -- engineers, product managers, domain experts, and risk/compliance teams all have legitimate reasons to change or review it. But they don't share a common language for *what a change does*.

ctxwitch's 12 behavioral dimensions give them one. Different roles tend to move different dimensions:

| A change from… | tends to affect… |
|---|---|
| **Product** | Task Scope — what the agent will and won't handle |
| **Security** | Safety — what it must refuse or escalate |
| **Domain expert** | Knowledge Scope — what it knows and asserts |
| **Engineering** | Tools & Autonomy — what it can do on its own |
| **Compliance** | Constraints — what it must disclose or withhold |

Instead of "someone edited the prompt," everyone sees the same thing: *which dimensions moved, and how much.* That shared representation is what lets a change reach the right reviewer — and what a governance layer can build on. Increasingly, an organization's domain expertise lives in an agent's prompts and guardrails, not its code; ctxwitch keeps that growing behavioral footprint legible and safe to change.

## The manual workflow

Once you want the full review loop, move your agent's context into a `witch.yaml` and manage it like code:

```bash
# Initialize a project
witch init my-support-agent

# Edit witch.yaml with your AI config, then commit
witch commit -m "configure support agent prompt"

# Create a branch for changes
witch checkout -b refund-policy-update

# Edit witch.yaml...
witch commit -m "tighten refund approval per CEO feedback"

# Create a Context PR
witch pr create -t "Tighten refund approval policy"

# Run eval gate
witch eval

# View the semantic diff with behavioral impact analysis
witch diff --ref main

# Enable LLM-as-judge for deeper subjective analysis
witch diff --ref main --judge

# View history
witch log
```

> **Alias:** You can also use `ctxw` instead of `witch` for all commands.

## Use the governed context in your app

Your agent loads its context from witch.yaml instead of hardcoding it — so
behavior changes ship through Context PRs, not redeploys:

```python
from ctxwitch.runtime import load_components

components = load_components(env="prod")  # or set CTXWITCH_ENV

response = client.messages.create(
    model=components["model"],
    system=components["system_prompt"],
    temperature=components["temperature"],
    max_tokens=components["max_tokens"],
    messages=[...],
)
```

Environment overrides from the `environments:` block are deep-merged, so dev
and prod diverge only where they say they do. Non-Python stacks: `witch spell
export --format json` in your build step.

## CLI Reference

### Core Commands

| Command | Description |
|---------|-------------|
| `witch tour` | Guided hands-on walkthrough in a disposable sandbox (start here) |
| `witch scan <file> [--diff REF] [--framework adk\|generic]` | Extract the behavioral surface from existing agent code and run CBIA — no witch.yaml required |
| `witch ci --base REF [--fail-on breaking\|significant\|minor\|never]` | Scan a PR's changed files (code + witch.yaml), emit a report, exit 2 when blocked — powers the GitHub Action |
| `witch init <name>` | Initialize a new ctxwitch project |
| `witch status` | Show current context state |
| `witch commit -m "msg"` | Commit context changes with version bump + rollback tag |
| `witch checkout [-b] <branch>` | Switch to or create a context branch |
| `witch diff [--ref REF] [--judge]` | Behavioral diff vs last commit (or any ref), like `git diff` |
| `witch log [-n COUNT]` | Show context change history |
| `witch eval [--judge] [--allow-breaking]` | Run the gate: metric thresholds + CBIA; Breaking changes block (exit 2) unless overridden |
| `witch rollback <version>` | Rollback to a specific version |
| `witch branches` | List all context branches |

### Context PRs

| Command | Description |
|---------|-------------|
| `witch pr create -t "title"` | Create a context PR from current branch |
| `witch pr list` | List all context PRs |
| `witch pr show <number>` | Show PR details with diff and comments |
| `witch pr merge <number>` | Merge a PR (blocked on Breaking changes unless `--allow-breaking`) |

### Inspect

| Command | Description |
|---------|-------------|
| `witch inspect prompt` | Show the full system prompt |
| `witch inspect tools` | List all tool definitions |
| `witch inspect rag` | Show RAG configuration |
| `witch inspect env [ENV]` | Show environment-specific overrides |

### Spell (Transform)

| Command | Description |
|---------|-------------|
| `witch spell set <key> <value>` | Set a context component value |
| `witch spell add-tool <name>` | Add a tool definition |
| `witch spell validate` | Validate witch.yaml against schema |
| `witch spell export [--format]` | Export context as YAML or JSON |

## witch.yaml Schema

The `witch.yaml` file is the atomic unit of ctxwitch. It captures the full behavioral surface of your AI application. A complete reference is at [`examples/witch.yaml`](examples/witch.yaml).

```yaml
version: "v0.1.0"
name: "my-support-agent"
description: "AI context managed by ctxwitch"
owner: "team-name"

components:
  system_prompt: |
    You are a helpful customer support assistant.
    Always verify identity before discussing account details.

  model: "claude-sonnet-4-20250514"
  temperature: 0.3
  max_tokens: 4096

  rag_config:
    enabled: false
    chunk_size: 512
    top_k: 5
    embedding_model: "text-embedding-3-small"

  tool_definitions:
    - name: "search_kb"
      description: "Search the knowledge base"
    - name: "escalate"
      description: "Escalate to human agent"
      requires_confirmation: true

  memory:
    enabled: false
    backend: "local"
    retention_days: 30
    write_policy: "on_trigger"

  guardrails:
    blocked_topics: ["violence", "illegal_activity"]
    max_turns: 50

environments:
  dev:
    components:
      temperature: 0.7
  prod:
    components:
      temperature: 0.3

eval:
  golden_dataset: "evals/golden.jsonl"
  metrics:
    - name: "helpfulness"
      threshold: 70
      direction: "higher_is_better"
    - name: "safety"
      threshold: 90
      direction: "higher_is_better"
  block_on_failure: true
```

## Architecture

```
ctxwitch/
  core/          # Context schema, model, diff engine, CBIA pipeline
  cli/           # Click-based CLI (witch, tour, inspect, spell commands)
  engine/        # Git-backed store, PR workflow engine
  eval/          # Pluggable eval gate framework + live model runner
  runtime.py     # Load governed context into your agent (env overrides)
  a2a/           # Agent-to-agent handover versioning (future)
ccia-bench/      # Public benchmark: labeled context-change pairs + scorer
examples/        # Sample witch.yaml and golden.jsonl
tests/           # Test suite (184 tests)
```

## What's Built

- [x] Context YAML schema and validation
- [x] Git-backed versioning engine with rollback tags
- [x] CLI: init, commit, checkout, diff, log, status, rollback + guided `witch tour`
- [x] Context PR workflow (create, list, review, merge with Breaking-change gate)
- [x] Eval gate framework: structural heuristics + live model eval (`eval.mode: live`)
- [x] 6-tier CBIA behavioral semantic diff pipeline
- [x] 12-dimension behavioral taxonomy with compound severity
- [x] Directive contradiction, numeric-threshold, and environment-override detection
- [x] Typo/punctuation-robust negation detection (orthographic verdict stability)
- [x] Confidence-gated LLM-as-judge (Tier 6)
- [x] CI-ready exit codes (`witch diff --strict`, `witch eval`)
- [x] Runtime API (`ctxwitch.runtime.load_components`)
- [x] Code extraction (`witch scan`): CBIA on existing ADK / raw-SDK agents, no witch.yaml required
- [x] GitHub Action (`witch ci`): behavioral-impact comment on every PR, runs in your CI, zero telemetry
- [x] Public benchmark (`ccia-bench`: 58 labeled pairs)

## What's Next

- More framework adapters for `witch scan` (LangGraph, CrewAI)
- Remote PR integration (GitHub, GitLab)
- CI/CD templates
- Multi-agent context versioning
- Plain-English CBIA guide (docs/)
- More to come — [follow the project](https://github.com/ctxwitch/ctxwitch) for updates

## Community

- **Questions & ideas** → [GitHub Discussions](https://github.com/ctxwitch/ctxwitch/discussions)
- **Bugs & misclassifications** → [Issues](https://github.com/ctxwitch/ctxwitch/issues) — CBIA misses are gold; they become benchmark pairs
- **Contributing** → [CONTRIBUTING.md](CONTRIBUTING.md) — new `ccia-bench` pairs are the most valuable first PR

If ctxwitch is useful to you, a ⭐ helps other agent builders find it.

## Research

This tool implements the framework described in:

> Kulkarni, A. A. (2026). *Context Change Impact Analysis: A Framework for Governing AI Agent Behavior Through Structured Context Versioning.* Zenodo. [https://doi.org/10.5281/zenodo.20741295](https://doi.org/10.5281/zenodo.20741295)

Also available on SSRN: [https://doi.org/10.2139/ssrn.7011398](https://doi.org/10.2139/ssrn.7011398)

## License

Apache License 2.0 -- see [LICENSE](LICENSE) for details.
