# Convergence Check

> Evaluate whether a hypothesis newly entered the current top-k set and update the convergence counter deterministically.

- **Type:** Skill
- **Install:** `agentstack add skill-panjose-co-scientist-convergence-check`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [panjose](https://agentstack.voostack.com/s/panjose)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [panjose](https://github.com/panjose)
- **Source:** https://github.com/panjose/Co-Scientist/tree/main/skills/convergence-check

## Install

```sh
agentstack add skill-panjose-co-scientist-convergence-check
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# convergence-check

Goal:

- Evaluate whether a hypothesis newly entered the current top-k set and update the convergence counter deterministically.

Inputs:

- `hypothesis_id`
- `previous_top_k_ids`
- `current_top_k_ids`
- current convergence count
- caller-owned `state/EVOLUTION_STATE.json`

Outputs:

- `ConvergenceCheckResult`
- updated convergence count
- when consumed by the evolution loop, updated `state/EVOLUTION_STATE.json`

Context Loading:

- Open `skills/shared-references/schema-index.md`.
- Read `packages/agent_contracts/pipeline_control.py` and confirm the exact `EvolutionStateContract` shape before writing `state/EVOLUTION_STATE.json`.
- Treat the top-k sets as caller-supplied frontier inputs. This skill only evaluates the rule and updates the counter.

Execution Contract:

- This skill is deterministic and must not call an LLM.
- Use `from tools import evaluate_convergence` as the stable invocation surface.
- The exported helper is implemented in `packages/agent_mechanics/convergence_check.py`.
- The helper signature is `evaluate_convergence(hypothesis_id, previous_top_k_ids, current_top_k_ids, current_convergence_count) -> ConvergenceCheckResult`.

Execution Steps:

1. Open `skills/shared-references/schema-index.md`, then read `packages/agent_contracts/pipeline_control.py` before writing `state/EVOLUTION_STATE.json`.
2. Read the candidate `hypothesis_id`, the previous and current top-k sets, and the current convergence count.
3. Call `tools.evaluate_convergence(hypothesis_id, previous_top_k_ids, current_top_k_ids, current_convergence_count)`.
4. Return the `ConvergenceCheckResult` to the caller.
5. When used by the evolution loop, persist the returned `entered_top_k` and `convergenceCount` values into `state/EVOLUTION_STATE.json`.
6. Validate any updated `state/EVOLUTION_STATE.json` artifact before declaring completion.

Artifact Rules:

- The convergence rule is fixed: entering the top-k frontier resets the counter to zero; otherwise the counter increments by one.
- Do not fold additional stopping logic into this skill. Stop decisions belong to evolution state management and completion verification.

Completion Rule:

- This skill is complete only when the deterministic result has been produced and any caller-owned `state/EVOLUTION_STATE.json` update matches that result exactly.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [panjose](https://github.com/panjose)
- **Source:** [panjose/Co-Scientist](https://github.com/panjose/Co-Scientist)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-panjose-co-scientist-convergence-check
- Seller: https://agentstack.voostack.com/s/panjose
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
