flurdy/agent-skills / skills/plan-to-backlog
plan-to-backlog
VerifiedMaterialize an approved cited plan into proportionate Beads tracking when the user asks for durable ownership. Recommends no item, one item, or a bounded epic; checks owners and duplicates; previews every write; applies only after exact confirmation.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 19.0 KB |
| references/contract.md | markdown | 19.0 KB |
| scripts/confirmed-bd.shexecutable | script | 5.5 KB |
| scripts/sha256-stdin.shexecutable | script | 893 B |
| scripts/utc-now.shexecutable | script | 150 B |
| tests/fixtures/decision-boundary-scenarios.json | config | 23.0 KB |
| tests/fixtures/decision-scenarios.json | config | 20.6 KB |
| tests/test-helpers.shexecutable | script | 9.9 KB |
| tests/test-skill-contract.shexecutable | script | 5.9 KB |
| tests/test_decision_fixtures.py | script | 34.2 KB |
tests/test-skill-contract.sh
View on GitHub#!/usr/bin/env bash
set -euo pipefail
TEST_DIR=$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
SKILL_DIR=$(dirname -- "$TEST_DIR")
REPO_ROOT=$(CDPATH='' cd -- "$SKILL_DIR/../.." && pwd -P)
SKILL="$SKILL_DIR/SKILL.md"
CONTRACT="$SKILL_DIR/references/contract.md"
ARCHITECT="$REPO_ROOT/skills/architect/SKILL.md"
TRIAGE="$REPO_ROOT/skills/triage/SKILL.md"
CATALOG="$REPO_ROOT/skills/README.md"
MAKEFILE="$REPO_ROOT/Makefile"
fail() {
printf 'FAIL: %s\n' "$*" >&2
exit 1
}
assert_contains() {
local file=$1 expected=$2
grep -Fq -- "$expected" "$file" || fail "expected '$expected' in $file"
}
assert_not_contains() {
local file=$1 unexpected=$2
if grep -Fq -- "$unexpected" "$file"; then
fail "did not expect '$unexpected' in $file"
fi
}
line_of() {
local file=$1 heading=$2
grep -nF -- "$heading" "$file" | head -1 | cut -d: -f1
}
[[ -f "$SKILL" ]] || fail "missing plan-to-backlog skill"
[[ -f "$CONTRACT" ]] || fail "missing plan-to-backlog contract"
assert_contains "$SKILL" '[plan-to-backlog contract](references/contract.md).'
assert_not_contains "$SKILL" '../../docs/plans/plan-to-backlog-contract.md'
assert_not_contains "$SKILL" 'disable-model-invocation:'
assert_contains "$SKILL" 'Select this skill dynamically, or through `/plan-to-backlog`, only when:'
assert_contains "$SKILL" 'The existence or approval of a plan alone is not a trigger.'
assert_contains "$SKILL" 'Proposal-first. May recommend no backlog change. Never writes without confirmation.'
assert_contains "$SKILL" 'next-select stores'
assert_contains "$SKILL" 'next-select resolve <id>'
assert_contains "$SKILL" 'confirmed-bd.sh --directory <directory>'
assert_contains "$SKILL" 'do not fall back to
the workspace store'
assert_contains "$SKILL" 'Do not write to a store other than the one resolved or chosen in step 2.'
frontmatter=$(awk 'NR == 1 { next } /^---$/ { exit } { print }' "$SKILL")
for permission in \
'Bash(~/.agents/skills/next/scripts/next-select:*)' \
'Bash(bd status:*)' \
'Bash(bd list:*)' \
'Bash(bd search:*)' \
'Bash(bd show:*)' \
'Bash(bd children:*)' \
'Bash(~/.agents/skills/plan-to-backlog/scripts/utc-now.sh:*)' \
'Bash(~/.agents/skills/plan-to-backlog/scripts/sha256-stdin.sh:*)' \
'Bash(~/.agents/skills/plan-to-backlog/scripts/confirmed-bd.sh:*)'; do
grep -Fq -- "$permission" <<<"$frontmatter" || fail "missing permission $permission"
done
for forbidden in \
'Write' \
'Bash(rm:*)' \
'Bash(chmod:*)' \
'Bash(date:*)' \
'Bash(bd:*)' \
'Bash(bd create:*)' \
'Bash(bd update:*)' \
'Bash(bd dep add:*)' \
'Bash(bd close:*)' \
'Bash(bd delete:*)' \
'Bash(bd supersede:*)' \
'Bash(bd promote:*)'; do
if grep -Fq -- "$forbidden" <<<"$frontmatter"; then
fail "unsafe or overly broad permission $forbidden"
fi
done
proposal_line=$(line_of "$SKILL" '## Render the proposal')
confirmation_line=$(line_of "$SKILL" '## Confirm the exact proposal')
apply_line=$(line_of "$SKILL" '## Apply the confirmed proposal')
[[ -n "$proposal_line" && -n "$confirmation_line" && -n "$apply_line" ]] || \
fail "proposal, confirmation, and apply sections must exist"
((proposal_line < confirmation_line && confirmation_line < apply_line)) || \
fail "proposal and confirmation must precede apply"
for invariant in \
'Never create one bead per plan step.' \
'readiness: ready | needs-clarification' \
'disposition: no-item | single-item | epic' \
'proposalVersion' \
'generatedAt' \
'utf8-lf-final-newline-v1' \
'stable proposal refs' \
'ledger-based reference resolution' \
'bd list --metadata-field plan_source_sha256=<source-fingerprint>' \
'Nothing has been changed.' \
'proposal fingerprint' \
'bd create --dry-run' \
'bd update --type epic' \
'rerun every source, locator, outcome, owner, and duplicate query' \
'Run each preflight only immediately before' \
'Declining, abandoning, or answering ambiguously performs no writes.' \
'stop before operations that depend on the failed result' \
'must never create a second tree'; do
assert_contains "$SKILL" "$invariant"
done
assert_not_contains "$SKILL" 'plan_proposal_sha256'
assert_not_contains "$SKILL" 'bd search --metadata-field'
assert_contains "$ARCHITECT" '/plan-to-backlog <plan-source>'
assert_contains "$ARCHITECT" 'must not invoke `/plan-to-backlog` automatically'
assert_not_contains "$TRIAGE" 'Skill(plan-to-backlog)'
assert_contains "$TRIAGE" 'paste-ready `/plan-to-backlog <plan-source>` handoff'
assert_contains "$TRIAGE" 'Do not classify plan children or create beads first.'
assert_not_contains "$TRIAGE" '/triage plan'
# Tracking is not an invitation to start implementation in the triage session.
for invariant in \
'This closing rule applies to free-text intake, Jira-sourced intake, and existing-bead refinement.' \
'Creating or refining a bead never implies starting work in this session.' \
'**Next:** Nothing required.' \
'Replace that default only for a concrete user-owned pending decision' \
'A declined proposal alone does not require a follow-up decision.' \
'Do not propose claiming, starting, or implementing the bead in the current session.' \
'Do not infer which session is for planning or implementation.' \
'Mention `/next` only when the user asks how to pick the work up elsewhere.' \
'Preserve the explicit `/plan-to-backlog` routing above and the `--human-review` contract'; do
assert_contains "$TRIAGE" "$invariant"
done
assert_not_contains "$TRIAGE" '**Next:** Start'
assert_not_contains "$TRIAGE" '**Next:** Claim'
assert_not_contains "$TRIAGE" '**Next:** Implement'
assert_contains "$CATALOG" '| plan-to-backlog |'
assert_contains "$CATALOG" 'approved plan'
assert_contains "$CATALOG" 'no-item/single-item/epic'
assert_contains "$CATALOG" 'explicit confirmation before writes'
assert_contains "$MAKEFILE" 'test-plan-to-backlog:'
printf '%s\n' 'plan-to-backlog contract tests passed'
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |