backchain
Use when an implementation task needs a dependency-aware plan before coding: backward planner / backchain / precondition-first planning, dependency DAGs…
Skill by whichguy
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/whichguy-backchain
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.
About
Use cases: productivity
Reviews
Write a reviewNo 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
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/backchain
What's inside
- Skill name
backchain- Description
- Use when an implementation task needs a dependency-aware plan before coding: backward planner / backchain / precondition-first planning, dependency DAGs, elaborating incomplete plans, or scheduler-ready step graphs. Turns a natural-language coding request into a forward draft then backward-chaining enriched DAG with explicit unresolved risks, then directly calls the selected Until Loop to repeat dependency review, by default until two consecutive trivial/no-change reviews, or for one cycle when the caller states `Backchain passes: one`.
- License
- MIT
- Instructions
- 383 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- files: referenced but missing: references/runtime-ephemeral.md
Files (18)
- SKILL.md
- evals.json · evals/
- trigger-evals.json · evals/
- audit.prompt.md · prompts/
- convergence-review.prompt.md · prompts/
- dependency-review.prompt.md · prompts/
- elaborator.v1.md · prompts/
- generator.v1.md · prompts/
- intent-judge.prompt.md · prompts/
- revise.prompt.md · prompts/
- caller-contract.md · references/
- convergence.md · references/
- dependency-context.md · references/
- harness.md · references/
- technical-interactions.md · references/
- technical-lens-cards.md · references/
- technical-lenses.md · references/
- check_preservation.py · scripts/
SKILL.md (first lines)
# Backchain
Use Backchain when an implementation task needs an explicit dependency graph before work
starts. It turns a raw coding description into a forward draft, then **backward-chains**
that draft into an enriched dependency DAG with explicit unresolved risks. For a complete
planning result, Backchain binds the selected actual **Until Loop** card and its package-relative
ephemeral adapter to review and improve the scoped plan until Until Loop returns its exact
terminal receipt. Backchain does not implement a second loop, counter, or recovery state.
## Mode selection (prompt-first)
| Mode | When | Product label |
|------|------|----------------|
| **Native** (default) | Grok / Claude / Codex / Hermes chat | **native-unvalidated** plan JSON plus selected Until Loop binding |
| **Structural check** | Backchain development checkout available; user wants waves/validation | **script-packaged** via `--package-only` |
| **One-shot harness** | Candidate generation→elaboration | `run-prompt.sh` (one-shot; not convergence) |
| **NBQ experiment** | Explicit EVSI / casebook A/B only | **nbq-experiment** — never default |
**Native procedure (any host):**
Read `references/convergence.md` and `references/technical-lenses.md` before planning.
The full technical index must actually be loaded before a planning review, even when the
request looks simple; classify inapplicable categories explicitly. Read the selected
Until Loop card (`SKILL.md`, or the caller's explicitly selected bundled `ADAPTER.md`)
and its `references/runtime-ephemeral.md` in full. Resolve that reference and the
ephemeral adapter relative to the selected card's directory. No Git prerequisite applies unless the planning task
itself needs repository evidence.
No ambient Until Loop installation, custom Backchain pass counter, pass ceiling,
or substitute scheduler is allowed.
### Compatibility-native plan
1. Load `prompts/generator.v1.md` (or package copy) with `{{RAW_PROMPT}}` → draft JSON.
2. Load `prompts/dependency-review.prompt.md` with goal + draft → dependency-context JSON (`source: native`).
3. Resolve only evidenced facts; unevidenced world-state is not `initial_state`.
4. Load `prompts/elaborator.v1.md` with draft + rendered dependency context → enriched JSON.
After serialization, run the package-local `scripts/check_preservation.py` in legacy
mode against the saved draft, as `references/convergence.md` describes. Resolve its
differences before freezing the enriched candidate.
5. Freeze the enriched plan artifact and original request as the plan-only Until Loop child
candidate described in `references/convergence.md`. One Until Loop callback may use the
Backchain review primitive and dependency review/elaboration for an authorized repair,
while legacy seed/null edges and `goal_needs` remain preserved.
6. Return `{plan, convergence}` only after the exact selected Until Loop terminal `complete`
receipt plus the final Backchain domain evidence. Otherwise return an honest incomplete
binding companion. Report `mode=native` and `structural_plan_status: unknown` outside
the plan unless a deterministic validator receipt exists for this exact plan. Keep
`parallel_groups: []` in the canonical plan until that receipt exists.
7. Optional packaging in a Backchain development checkout: `bash harness/run-prompt.sh --package-only enriched.json`
proves only its structural result, never Until Loop completion.
### Source-aware native plan (explicit `backchain-caller/v1` selection)
Use this for requests with supporting specifications or source verification when the host
prepares the companion packet. Read `references/caller-contract.md` first. Original
request, selected source snapshots, caller packet, and selected lens findings travel as
the same data through generator, dependency review, elaborator, and the selected Until Loop
child context; existing plan JSON/schema remain unchanged.
1. **Plan/draft:** generate, dependency-review, and elaborate with the retained caller
data. Preserve action/stage/action ID/owner/workflow stage, observed locator bases,
source authority/provenance/currentness/revision/digests, resolved locators, and
distinct candidate identities in the companion. Check draft → enriched preservation
in legacy mode before freezing the enriched candidate, just as above.
2. **Review/audit diagnostic:** `prompts/audit.prompt.md` returns review only. It does
not start Until Loop or claim convergence. Applicable unavailable, stale, or ambiguous
normative sources keep source review incomplete absent inspected supersession evidence.
3. **Repair/revise:** an active selected Until Loop callback may use the audit primitive,
fresh whole-plan review, and the one-revision `prompts/revise.prompt.md` within exact
bounds. Running/completed work, accepted facts, and protected items remain immutable;
new nodes/edges need permission and rewires need a source-linked old-to-new map.
4. Bind the frozen candidate, source/lens context, bounds, and no-commit/no-project-
execution scope to the selected whole Until Loop card. Until Loop owns
recurrence, the review gate (by default two consecutive trivial reviews; one cycle when
the child request carries `Backchain passes: one`, as `references/convergence.md`
defines), resume, budget/stop handling, and its terminal receipt. Backchain never
supplies a pass ceiling or interprets a counter.
5. Only an exact Until Loop `complete` receipt plus final candidate-specific source/bounds/
validation evidence permits `review.convergence` to say converged planning. A revised
graph has `parallel_groups: []` and structural status `unknown` until deterministic
validation for its exact output digest. Keep experiments scoped to exact condition,
consumer, target, receipt scope/fidelity, and disposition.
Use `references/technical-lenses.md` to select applicable technical discovery questions,
`references/technical-lens-cards.md` for cards, and `references/technical-interactions.md` for
cross-lens questions. These are triggers and aids, never requirements by themselves.
**Question ≠ fact.** An unanswered question is not evidence and must not invent a `D*` by itself. An unevidenced world-state a step actually presupposes still needs a predecessor that would produce that evidence, or an honest `unresolved` — never a raw assumption.
Harness inventory, env, exit codes: `references/harness.md`. Dependency context shape: `references/dependency-context.md`.
## Procedure (automated packaging)
**One-shot candidate packaging** (Backchain development checkout + Claude-compatible runner):
The commands below do not run Until Loop or semantic convergence. A direct CLI exit 0
proves only its documented structural result. The scripts and benchmark prompts remain
one-pass primitives; bind their resulting candidate to selected Until Loop separately.
```sh
bash harness/run-prompt.sh --prompt samples/oauth-login-tests.prompt.md
# defaults: elaborator TRACE on; relationship learnings on stderr
# options: --report compact|full · --no-trace · --quiet · --model sonnet · --from-draft · --package-only
# opt-in: --nbq | --next-best-deps (dependency-scoped next-best-questions before elaborate)
```
**Alternate elaborator backends:** `BACKCHAIN_ELAB_BACKEND` accepts `router` (default),
`ollama`, `ask-ollama`, or `cmd`. Use `BACKCHAIN_ELAB_MODEL` to pin the alternate model;
`cmd` also requires `BACKCHAIN_ELAB_CMD` and executes an executable path through its shebang.
Only the elaborator changes: a full `--prompt` run still needs the router for generation, while
`--from-draft` can use an alternate backend without a Claude-compatible runner. Audit identity in
`run.json`: `stages.elaborator.requested_model` is the requested pin and
`stages.elaborator.served_model` is the backend-reported model (with `served_models` retaining the
full list). Treat a missing served identity as unknown; the legacy top-level `model` is not proof
of which alternate model produced the elaboration.
**Opt-in next-best deps (`--nbq`):** default **off**. When set, after `draft.json` exists and
**before** the elaborator, Backchain builds a dependency-scoped problem from the draft, runs the
external **next-best-questions** skill (`infogain.py --json`), writes `nbq-problem.txt`,From whichguy/skill-craft, MIT.
More from whichguy/skill-craft
- 0.592score
rubric-eval
whichguy
Evaluate a prompt change against a rubric over a scenario catalog: run arms on a subject model (Grok by default), grade blind with one evidence-first judge…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
plan-dispatcher
whichguy
Use when executing or resuming an agreed dependency graph with one main dispatcher and parallel native workers: claim ready steps, preserve launch state…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
adversarial-review
whichguy
Have an independent model try to break a proposed change and return its findings as testable hypotheses, each with the smallest experiment that would refute it.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
improve
whichguy
Use when a repository candidate needs a deliberate review-and-improvement loop: use recent Git history, make warranted changes, run meaningful checks, and…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-coverage
whichguy
Add a post-ship improve-to-exhaustion directive to a plan, or run that directive after implementation.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
ask-agent
whichguy
A delegation skill, not an agent type.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
in-parallel
whichguy
Use for "in parallel" or when one goal should be divided among independent native agents and returned as one verified aggregate.
SkillAFreshness: A★ 1Claude Code +9 - 0.588score
shiploop-e2e-audit
whichguy
Run the ShipLoop test harness and audit its retained graph, review, test, product and incremental-change evidence.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
improve-system-prompt
whichguy
Benchmark and compare system prompt variants (V2/V2a/V2b/V2c) for Sheets Chat by running test scenarios through the real GAS-side ClaudeConversation pipeline.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
architect
whichguy
Design system architecture and make technology decisions.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
plan-test
whichguy
Generate comprehensive tests for code.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
improve-agent
whichguy
Use when Improve should run in a fresh native agent instead of this conversation: start one agent that runs /improve in its own context, keep useful parent…
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 18, 2026 (11 days ago)
- Last release
- Aug 15, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/whichguy/skill-craft
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from whichguy
- 0.592score
plan-dispatcher
whichguy
Use when executing or resuming an agreed dependency graph with one main dispatcher and parallel native workers: claim ready steps, preserve launch state…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
rubric-eval
whichguy
Evaluate a prompt change against a rubric over a scenario catalog: run arms on a subject model (Grok by default), grade blind with one evidence-first judge…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
improve
whichguy
Use when a repository candidate needs a deliberate review-and-improvement loop: use recent Git history, make warranted changes, run meaningful checks, and…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
adversarial-review
whichguy
Have an independent model try to break a proposed change and return its findings as testable hypotheses, each with the smallest experiment that would refute it.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-coverage
whichguy
Add a post-ship improve-to-exhaustion directive to a plan, or run that directive after implementation.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
in-parallel
whichguy
Use for "in parallel" or when one goal should be divided among independent native agents and returned as one verified aggregate.
SkillAFreshness: A★ 1Claude Code +9
Cite this page
backchain skill. Agent Mart. https://agentmart.dev/skills/whichguy-backchain (last updated 2026-10-24)