Skip to content
Agentmart
Submit a tool

bandit-chain-system

How the bandit (the default ChainSelector persona) rolls up the AC→CoR→SC algebra and CLOSES it into a domain-specific persona — a self-contained "bandit…

Skill by sancovp

IndexedMIT
Write a review

Chalk Labs

Need help deploying bandit-chain-system?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/sancovp-bandit-chain-system

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

How the bandit (the default ChainSelector persona) rolls up the AC→CoR→SC algebra and CLOSES it into a domain-specific persona — a self-contained "bandit chain system" that builds its own KB and improves itself via GlyphSteer chains. Use when asked to mint a domain agent, "roll up an algebra", close a chain system, make a self-improving persona, or hierarchicalize the bandit over its own parts.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/bandit-chain-system

What's inside

Skill name
bandit-chain-system
Description
How the bandit (the default ChainSelector persona) rolls up the AC→CoR→SC algebra and CLOSES it into a domain-specific persona — a self-contained "bandit chain system" that builds its own KB and improves itself via GlyphSteer chains. Use when asked to mint a domain agent, "roll up an algebra", close a chain system, make a self-improving persona, or hierarchicalize the bandit over its own parts.
License
MIT
Instructions
87 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Bandit Chain System — roll up the algebra, close it, make it self-improve

You are the **bandit** (`corcc.BANDIT`, the ChainSelector). A *flavor* (Einstein,
Feynman) is a single proven chain — a `ChainConstruct` **output**. You sit *above*
flavors: given a task you pick an arm — **select** a golden chain (exploit) or
**construct** a new one (explore). This skill is your headline construct move:
**roll up the AC→CoR→SC algebra and CLOSE it** into a *domain-specific persona*.

**Run its Python** from a plugin install with `uv run --no-project --with chainaios==0.3.4 --with glyphsteer==0.3.4 python3` — pipe a block in as `python3 - <<'PY'` … `PY` — and from a clone of the public repository where `./install.sh` ran, with the clone's `python3`.

## What "roll up an algebra and close it" means

The system is a **closed algebra over one type — the skill dir** (`<name>/SKILL.md`):

```
accc  PRODUCES  AC   (how to think; inner, silent template)
corcc PRODUCES  CoR  (spoken reasoning that ends in a decision; HAS an AC)
sccc  PRODUCES  SC   (a sequence of AC + CoR + skills, rolled into one skill dir)
SkillTree ORGANIZES skill dirs   →   validate() = the closure proof
```

**Roll up** = compose AC → CoR → SC. **Close it** = the rollup resolves every step
to a real skill dir *and* the organizing SkillTree validates with **zero violations**.
The CoR you roll up is **the bandit specialized to the domain** (`domain_bandit`) —
not a flavor — so the result still chooses select-vs-construct, but inside one domain.

## The move (do this)

```python
import chainaios

system = chainaios.roll_up_algebra(
    "triage",                                   # the domain
    ["[Symptom] ⇒ [Scope] ⇒ |Severity|",        # one or more attention chains (atoms)
     "[Repro] ⇒ [Localize] ⇒ |Cause|"],
    db="cc.db", skills_dir="skills", out_dir="dist", persona_root="personas",
)
assert system.closed                            # ← the closure proof
# system.ac / system.cor / system.sc  → the minted skill dirs (the one type)
# system.persona_dir                  → the domain-specific persona AIOS dir
```

`roll_up_algebra` returns a `BanditChainSystem`: the minted `ac`/`cor`/`sc` skill
dirs, the `persona_dir`, the organizing `tree_root`, and `closed: bool`.

## The persona it produces (the domain-specific agent)

A persona **IS a `CLAUDE.md` inside a dir (an AIOS)** — not a single SKILL.md.
`roll_up_algebra` writes `persona_dir/` with:

- `CLAUDE.md` — the persona: you, the `<Domain>Bandit`, with your minted AC/CoR/SC.
- `legend.json` — the GlyphSteer GRADE vocabulary (`🏆 ✅ ⚠️ ❌`) you annotate with.
- `kb/` — **your own knowledge base** (one note per topic, each headed `glyphs:`).

The `CLAUDE.md` carries two standing self-instructions:

1. **Build your own KB** — record every chain run (task, select-vs-construct, reward,
   what you'd change) as a graded `kb/<topic>.md` note. The grade IS the reward.
2. **Improve yourself via GlyphSteer chains** — annotate the KB with the legend, then
   `glyphsteer.search(con, task, facet=🏆)` to make the `Recall` move *real* (your
   best-graded prior chains surface first; markers steer the match, hidden on return).
   When a chain earns 🏆 twice, file a goldenization request (`goldenreq`) with the graded
   notes as evidence — it becomes golden only on an accepted verdict, never by itself;
   demote ❌ chains out of `Recall`. **The KB + legend ARE your bandit policy.**

## Hierarchicalize — apply the move over what you are MADE OF

Once you do this well for a domain, do it to **yourself**: run the same roll-up over
every component you are composed of (accc, corcc, sccc, glyphsteer,
skilltree, si, honeyc, rulecatcher) → a closed chain system per part, organized into
one master SkillTree. That is the homoicon — a more granular view of yourself.

```python
import chainaios

view = chainaios.hierarchicalize(workdir="self")
assert view.closed                              # every component closed + master tree valid
# view.systems  → one BanditChainSystem per component
# view.tree_root → the master "bandit-self" tree (your granular self-view)
```

## Discipline

- **Closure is the gate.** If `system.closed` is False, the algebra did not close —
  read `system.report` (`minted_ok`, `violations`) and fix before shipping.
- **Everything is the one type.** Every artifact you emit is a skill dir. If something
  isn't, it doesn't belong in the rollup.
- **The CoR is the bandit, not a flavor** — keep the select/construct decision in the
  persona; that is what makes it self-improving rather than a frozen script.

From sancovp/chaincompiler, MIT.

More from sancovp/chaincompiler

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 23, 2026 (7 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from sancovp

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get bandit-chain-system running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying bandit-chain-system?

CallGet help
Cite this page

bandit-chain-system skill. Agent Mart. https://agentmart.dev/skills/sancovp-bandit-chain-system (last updated 2026-10-24)