adaptogen
adaptogen is a DAG of states, and each state is its own real Agent
Skill, not a file inside this one. This SKILL.md is the router: it
names which sibling skills exist and which transitions between them are
legal, so an agent entering here knows where to go first and how to
read the map for every later hop. Every sibling skill's own instructions
repeat, inline, everything that must hold true in that state -- because
skills do not share context automatically, each one must be
self-contained on its own, not merely a chapter of this one.
That is the whole point of building skills this way: the states
accomplish what we're trying to describe instead of describing what
we're trying to accomplish. A reader entering any one sibling skill
acts correctly from that skill's own text alone, invoking the next skill
the DAG calls for, instead of reconstructing intent from a rule stated
once here and assumed to still apply three hops later.
This same DAG-of-skills convention is not just how adaptogen is built --
it is what adaptogen builds. Every skill this skill authors or edits
(see adaptogen-land) is itself restructured into a family of
self-contained sibling skills with explicit transitions, for the same
reason -- and always kept compliant with the agentskills.io
specification (one SKILL.md per skill folder, name matching the
folder, valid frontmatter): a DAG of skills is still, at every node, a
normal, independently valid, independently discoverable Agent Skill.
State map
adaptogen-orient --existing skill----------> adaptogen-run (target as-is)
adaptogen-orient --new skill----------------> adaptogen-build-new
adaptogen-build-new --skill drafted---------> adaptogen-run
adaptogen-run --report captured-------------> adaptogen-critique
adaptogen-run --leaf-agent, or caller scoped one bounded pass--> STOP (report first)
adaptogen-critique --finding(s) confirmed---> adaptogen-land
adaptogen-critique --nothing survives the evidence gate--> STOP
adaptogen-land --every confirmed finding has a file edit + confirmed re-read--> adaptogen-commit-confirm
adaptogen-commit-confirm --commit made, regress to confirm--> adaptogen-run
adaptogen-commit-confirm --confirming re-run: finding gone, nothing new/worse--> STOP
adaptogen-commit-confirm --confirming re-run: finding persists or regressed----> adaptogen-run
[git revert first -- regression]
adaptogen-commit-confirm --leaf-agent, caller scoped one bounded pass, editing forbidden, or no committable repo--> STOP
[no confirming re-run]
Six state-skills: adaptogen-orient, adaptogen-build-new,
adaptogen-run, adaptogen-critique, adaptogen-land,
adaptogen-commit-confirm. STOP is terminal, not a skill -- reaching
it means stop dispatching and report which edge reached it, since
"stopped" alone doesn't tell the caller whether the target is now clean
or a caller-stated bound simply cut the loop short.
Each state-skill is a real, independent sibling skill directory next to
this one (skills/adaptogen-<name>/). Entering a state means: dispatch
Skill(skill="adaptogen-<name>") (or, if that skill was itself written
earlier in the same turn and is not yet Skill-dispatchable per the
Gotcha below, use the Agent tool to follow its SKILL.md directly), and
follow it exactly -- its own text tells you what must hold, what to do,
which sibling skill(s) you may transition to, under what condition, and
exactly what state to carry forward into that next dispatch (skills
share no context automatically -- name every fact the next skill needs
explicitly when you invoke it). Never skip straight to a later state
from prose memory of what it probably says; a fresh invocation reads
the current, real text of that skill, not this map's one-line
transition labels, which are a map, not the authority.
Entry
- Dispatch
Skill(skill="adaptogen-orient") and follow it now.
Hard Rules (bind in every state -- restated locally in each
state-skill too, so no state depends on a reader having this list in
view)
- Never edit a skill without running it first, this pass. An edit
made from reading prose alone, unconfirmed by a real dispatch, is a
guess. (
adaptogen-orient/adaptogen-build-new ->
adaptogen-run is not optional.)
- Never dispatch a run inline in your own context. Subagents inherit
nothing -- use the Agent tool with a fully self-contained prompt.
Every fact a dispatched agent needs -- including full file contents,
not just a path -- must be pasted into its prompt. The same rule
applies to invoking sibling skills in this DAG: state carried across a
Skill() transition must be stated explicitly in that turn, not
assumed to persist.
- Never grade a run confirmatory, and never defer a real finding. A
second, fresh-context Agent actively hunts for fault in
adaptogen-critique. The moment a finding is evidence-backed (cited,
re-checked, not asserted), adaptogen-land it immediately, same pass.
- Never invent history. The record of what changed and why is the
git commit made in
adaptogen-commit-confirm -- not a separate log
kept in sync by hand.
- Never remove a skill's capability from one run's evidence. One run
adds a state/case a skill didn't handle; a failure recurring across
2+ independent runs (checked via the target's own
git log) justifies
removing or replacing something.
- Never leave a deterministic step as re-derived prose. A step
qualifies for scripting only when it contains no judgment AND a prior
run already recorded it producing identical output from identical
input. A step seen working once, or with any judgment branch, stays
prose.
- Never treat "found" as "fixed." A finding noted only in
adaptogen-critique's response with no corresponding edit in
adaptogen-land is observed, not improved.
- Never commit without confirming co-location first. The durability
model assumes the target's skill files live in the same git repo whose
git log is the lessons file -- a target with no such repo (e.g. an
installed-only copy with no .git ancestor, or a .git ancestor with
no real commit history about this target) cannot be landed into; edit
it in its own source repo instead, or produce findings only.
- Every state-skill in this DAG stays agentskills.io-compliant on its
own. Each is a normal skill: valid frontmatter (
name matching its
directory, non-empty description), Markdown body, no format that
only makes sense chained to siblings. A DAG is a set of valid skills
plus a map between them, never a single skill's content spread across
files an agent must open just to have working instructions.
Gotchas
- Leaf-agent mode collapses the dispatch edges. When adaptogen is
itself already running as a dispatched subagent (a leaf that cannot
spawn its own subagents),
adaptogen-run/adaptogen-critique/
adaptogen-commit-confirm execute their work in-context instead of
dispatching, and the confirming re-run is waived (see those siblings
for the exact rewiring). The state map's transitions still hold; only
the "dispatch a subagent" mechanic becomes "do it directly." A router
reader should not assume every edge always spawns a fresh agent.
- A skill written earlier in the same turn is not
Skill-dispatchable
mid-turn -- the skill list loads at session start. Use the Agent tool
to follow its SKILL.md directly instead; this is the normal path for
a state-skill just authored or edited this pass, not a fallback.
- Only adaptogen (walking
adaptogen-orient through
adaptogen-commit-confirm/STOP) edits a target's files. A target run
standalone, outside this loop, just executes its current instructions
-- there's no marker to check, because there's nothing conditional to
write.
- A target skill still shaped as a single flat
SKILL.md (no sibling
state-skills) is not a defect to fix reflexively --
adaptogen-land decides, per-pass, whether restructuring it into a
DAG of skills is itself an evidence-backed finding for this pass,
same as any other edit. A one- or two-step skill should usually stay a
single skill; splitting it into a DAG the task doesn't need is not
progress.
1---2name: adaptogen3description: Improve any agent skill -- itself included -- by running it as an isolated subagent, adversarially critiquing the result, and landing every evidence-backed fix immediately as a direct edit to that skill's own files (or, if the finding is in the host project rather than the skill, a direct edit there). Git is the entire durability layer: no side files, no state tracking -- a commit IS the checkpoint, the commit message IS the record. Use whenever asked to improve, harden, or debug a skill, or to build a new one from a real run instead of a guess.4---56# adaptogen78adaptogen is a DAG of states, and each state is its own real Agent9Skill, not a file inside this one. This `SKILL.md` is the router: it10names which sibling skills exist and which transitions between them are11legal, so an agent entering here knows where to go first and how to12read the map for every later hop. Every sibling skill's own instructions13repeat, inline, everything that must hold true in that state -- because14skills do not share context automatically, each one must be15self-contained on its own, not merely a chapter of this one.1617That is the whole point of building skills this way: the states18**accomplish what we're trying to describe instead of describing what19we're trying to accomplish**. A reader entering any one sibling skill20acts correctly from that skill's own text alone, invoking the next skill21the DAG calls for, instead of reconstructing intent from a rule stated22once here and assumed to still apply three hops later.2324This same DAG-of-skills convention is not just how adaptogen is built --25it is what adaptogen builds. Every skill this skill authors or edits26(see `adaptogen-land`) is itself restructured into a family of27self-contained sibling skills with explicit transitions, for the same28reason -- and always kept compliant with the agentskills.io29specification (one `SKILL.md` per skill folder, `name` matching the30folder, valid frontmatter): a DAG of skills is still, at every node, a31normal, independently valid, independently discoverable Agent Skill.3233## State map3435```36adaptogen-orient --existing skill----------> adaptogen-run (target as-is)37adaptogen-orient --new skill----------------> adaptogen-build-new3839adaptogen-build-new --skill drafted---------> adaptogen-run4041adaptogen-run --report captured-------------> adaptogen-critique42adaptogen-run --leaf-agent, or caller scoped one bounded pass--> STOP (report first)4344adaptogen-critique --finding(s) confirmed---> adaptogen-land45adaptogen-critique --nothing survives the evidence gate--> STOP4647adaptogen-land --every confirmed finding has a file edit + confirmed re-read--> adaptogen-commit-confirm4849adaptogen-commit-confirm --commit made, regress to confirm--> adaptogen-run50adaptogen-commit-confirm --confirming re-run: finding gone, nothing new/worse--> STOP51adaptogen-commit-confirm --confirming re-run: finding persists or regressed----> adaptogen-run52 [git revert first -- regression]53adaptogen-commit-confirm --leaf-agent, caller scoped one bounded pass, editing forbidden, or no committable repo--> STOP54 [no confirming re-run]55```5657Six state-skills: `adaptogen-orient`, `adaptogen-build-new`,58`adaptogen-run`, `adaptogen-critique`, `adaptogen-land`,59`adaptogen-commit-confirm`. `STOP` is terminal, not a skill -- reaching60it means stop dispatching and report which edge reached it, since61"stopped" alone doesn't tell the caller whether the target is now clean62or a caller-stated bound simply cut the loop short.6364Each state-skill is a real, independent sibling skill directory next to65this one (`skills/adaptogen-<name>/`). Entering a state means: dispatch66`Skill(skill="adaptogen-<name>")` (or, if that skill was itself written67earlier in the same turn and is not yet `Skill`-dispatchable per the68Gotcha below, use the Agent tool to follow its `SKILL.md` directly), and69follow it exactly -- its own text tells you what must hold, what to do,70which sibling skill(s) you may transition to, under what condition, and71exactly what state to carry forward into that next dispatch (skills72share no context automatically -- name every fact the next skill needs73explicitly when you invoke it). Never skip straight to a later state74from prose memory of what it probably says; a fresh invocation reads75the current, real text of that skill, not this map's one-line76transition labels, which are a map, not the authority.7778## Entry79801. Dispatch `Skill(skill="adaptogen-orient")` and follow it now.8182## Hard Rules (bind in every state -- restated locally in each83state-skill too, so no state depends on a reader having this list in84view)85861. **Never edit a skill without running it first, this pass.** An edit87 made from reading prose alone, unconfirmed by a real dispatch, is a88 guess. (`adaptogen-orient`/`adaptogen-build-new` ->89 `adaptogen-run` is not optional.)902. **Never dispatch a run inline in your own context.** Subagents inherit91 nothing -- use the Agent tool with a fully self-contained prompt.92 Every fact a dispatched agent needs -- including full file contents,93 not just a path -- must be pasted into its prompt. The same rule94 applies to invoking sibling skills in this DAG: state carried across a95 `Skill()` transition must be stated explicitly in that turn, not96 assumed to persist.973. **Never grade a run confirmatory, and never defer a real finding.** A98 second, fresh-context Agent actively hunts for fault in99 `adaptogen-critique`. The moment a finding is evidence-backed (cited,100 re-checked, not asserted), `adaptogen-land` it immediately, same pass.1014. **Never invent history.** The record of what changed and why is the102 git commit made in `adaptogen-commit-confirm` -- not a separate log103 kept in sync by hand.1045. **Never remove a skill's capability from one run's evidence.** One run105 adds a state/case a skill didn't handle; a failure recurring across106 2+ independent runs (checked via the target's own `git log`) justifies107 removing or replacing something.1086. **Never leave a deterministic step as re-derived prose.** A step109 qualifies for scripting only when it contains no judgment AND a prior110 run already recorded it producing identical output from identical111 input. A step seen working once, or with any judgment branch, stays112 prose.1137. **Never treat "found" as "fixed."** A finding noted only in114 `adaptogen-critique`'s response with no corresponding edit in115 `adaptogen-land` is observed, not improved.1168. **Never commit without confirming co-location first.** The durability117 model assumes the target's skill files live in the same git repo whose118 `git log` is the lessons file -- a target with no such repo (e.g. an119 installed-only copy with no `.git` ancestor, or a `.git` ancestor with120 no real commit history about this target) cannot be landed into; edit121 it in its own source repo instead, or produce findings only.1229. **Every state-skill in this DAG stays agentskills.io-compliant on its123 own.** Each is a normal skill: valid frontmatter (`name` matching its124 directory, non-empty `description`), Markdown body, no format that125 only makes sense chained to siblings. A DAG is a set of valid skills126 plus a map between them, never a single skill's content spread across127 files an agent must open just to have working instructions.128129## Gotchas130131- **Leaf-agent mode collapses the dispatch edges.** When adaptogen is132 itself already running as a dispatched subagent (a leaf that cannot133 spawn its own subagents), `adaptogen-run`/`adaptogen-critique`/134 `adaptogen-commit-confirm` execute their work in-context instead of135 dispatching, and the confirming re-run is waived (see those siblings136 for the exact rewiring). The state map's transitions still hold; only137 the "dispatch a subagent" mechanic becomes "do it directly." A router138 reader should not assume every edge always spawns a fresh agent.139- A skill written earlier in the same turn is not `Skill`-dispatchable140 mid-turn -- the skill list loads at session start. Use the Agent tool141 to follow its `SKILL.md` directly instead; this is the normal path for142 a state-skill just authored or edited this pass, not a fallback.143- Only adaptogen (walking `adaptogen-orient` through144 `adaptogen-commit-confirm`/`STOP`) edits a target's files. A target run145 standalone, outside this loop, just executes its current instructions146 -- there's no marker to check, because there's nothing conditional to147 write.148- A target skill still shaped as a single flat `SKILL.md` (no sibling149 state-skills) is not a defect to fix reflexively --150 `adaptogen-land` decides, per-pass, whether restructuring it into a151 DAG of skills is itself an evidence-backed finding for *this* pass,152 same as any other edit. A one- or two-step skill should usually stay a153 single skill; splitting it into a DAG the task doesn't need is not154 progress.