AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Bandit Chain System

skill-sancovp-dinf-bandit-chain-system · by sancovp

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.

No reviews yet
0 installs
9 views
0.0% view→install

Install

$ agentstack add skill-sancovp-dinf-bandit-chain-system

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-sancovp-dinf-bandit-chain-system)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Bandit Chain System? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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.

What "roll up an algebra and close it" means

The system is a closed algebra over one type — the skill dir (/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)

import chaincompiler as cc

system = cc.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 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/.md note. The grade IS the reward.

  1. 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). Promote a chain to golden when it earns 🏆 twice (mint it via roll_up_algebra); 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.

view = cc.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.

Source & license

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

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

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.