Install
$ agentstack add skill-sancovp-dinf-bandit-chain-system ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
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 →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, theBandit, 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 headedglyphs:).
The CLAUDE.md carries two standing self-instructions:
- 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.
- 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.closedis 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.
- Author: sancovp
- Source: sancovp/dinf
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.