v7 preview ticketing: a cross-epic `after` on an entry that the initiative does not declare, or that points to a later epic, passes `tickets.py` without a warning
Version
| Skill | bmad-preview-ticketing, installed with npx skills add bmad-code-org/BMAD-METHOD from ref dev |
dev commit |
bc5f6ac17806e6e0b64935537b0a44682eb93ec0 (2026-09-24) |
| Byte-identical to that commit | SKILL.md, customize.toml, references/slice.md, references/validate.md, references/board.md, scripts/tickets.py (checked with cmp against raw.githubusercontent.com) |
Same files on main |
identical to main @ a76af7f44efc9feabd6e05793e0e87b848a1c6a0 |
| Store | repo store (default repo-ticketing.toml), no customization of the ticketing skill |
| Runtime | uv 0.12.18, Python 3.13.7, macOS arm64 |
Summary
tickets.py checks the edge across the epic boundary in one direction only. Take an epic after that the initiative declares: if no entry pins it, unpinned_after reports it. Now take an entry whose after names an entry in another epic that its epic does not declare in the initiative's tickets.toml. That passes silently, even when the provider epic comes later in the initiative's table order. The default slicing rule says the opposite should hold: "say what each needs from the ones before it" (customize.toml:32).
What happened
In a planning run on a real brownfield initiative (six epics, 50 entries), one entry in epic 3 ended up with after = [..., "4.1"], an entry in epic 4:
- Not declared. The initiative's
tickets.tomlgives epic 3 onlyafter = [{ epic = 1, ... }]. - Points to a later epic. Epic 4's
[[epic]]table comes after epic 3's. Epic 4 in turn declaresafter = [{ epic = 3, needs = "..." }].
At entry level there is no cycle (4.1 → 3.2 → 4.7), and nothing deadlocks. But the declared plan now differs from the real one in two places:
- The initiative says "epic 4 needs something from epic 3". In fact epic 3 also needs something from epic 4, so the two epics depend on each other.
- Anyone who starts epics in table order, or reads only the initiative's
needs, meets a blocked entry in epic 3 that the plan does not explain.
tickets.py status and next exit 0: unpinned_after: [], no cycle, no drift.
How it came about
An orchestrated autonomous run, one agent per phase. Two deviations from the skill as written are relevant; see the last paragraph of this section.
- Slicing ("Initiative into epics",
references/slice.md). The initiative'stickets.tomlgot six[[epic]]tables in build order, each withafter = [{ epic, needs }]. - Inception of epic 1.
- Inception of epics 2–6, one agent per epic, run in parallel. Each followed "Epic into stories": "For each
afteron this epic in the initiative's breakdown, put the provider inafterof every entry that needs it …". - During epic 3's inception, the agent worked out each entry's prerequisites (
checks.dependencies, "Needs",customize.toml:126). It found that one entry really needs the output of epic 4's first entry, and pinned it as"4.1".slice.mdcovers prerequisites the initiative declares. It does not say what to do with one it does not declare: add it to the initiative'safter, check it against the epic order, or ask the user. - Epic 4's inception pinned its declared dependency on epic 3 as
"3.2". - Final
tickets.py status <initiative>: clean. So is the set check atcustomize.toml:108: "tickets.py statuson the epic runs clean: no cycle, nodrift, nounpinned_after".
Deviations, so you can weigh this. First, the inception agents were not allowed to edit the initiative's files, because parallel agents must not write one file. An interactive run might have updated the initiative's after by itself. Nothing in slice.md asks for it, though. Second, the validation checks ran inline, not in fresh subagents as validate.md:3 prescribes. The mechanical part does not depend on either deviation: tickets.py accepts the tree without a warning (see the reproduction below).
Order of inception. Had epic 3 been incepted before epic 4, it would have written "epic-<slug of 4>" as a placeholder. status then does show the edge, under epic 4's blocks. That is easier to spot, but it still raises no warning that the dependency is undeclared, or that it points to a later epic.
Why nothing catches it
unpinned_after(tickets.py:510–520) goes from the initiative's declaredafterto the entries. Nothing goes the other way, from an entry's cross-epicafterto its epic's declaredafter.- No check compares a cross-epic
afterwith the table order of[[epic]]. checks.tree(customize.toml:119: "eachafternames what is needed and from which epic") would be the natural place. Butvalidate.md:5runs it at slicing, before any entry exists.- It is harder to see in the output because
statusdoes not show the initiative's declared epic graph at all. That is a separate issue (#2964 ).
Minimal reproduction (no domain content)
T=<path to skill>/scripts/tickets.py # bc5f6ac
R=$(mktemp -d)/initiative-demo && mkdir -p $R/epic-a $R/epic-b
cat > $R/initiative-demo.md <<'E'
---
type: initiative
title: "Demo"
parent: none
covers: []
assignee: ""
risk: low
---
E
cat > $R/tickets.toml <<'E'
[[epic]]
id = 1
slug = "epic-a"
title = "A"
covers = []
[[epic]]
id = 2
slug = "epic-b"
title = "B"
covers = []
after = [{ epic = 1, needs = "A.2 output" }]
E
for s in a b; do printf -- '---\ntype: epic\ntitle: "%s"\nparent: initiative-demo\ncovers: []\nafter: []\nassignee: ""\nrisk: low\n---\n' $s > $R/epic-$s/epic-$s.md; done
cat > $R/epic-a/tickets.toml <<'E'
[[entry]]
id = 1
type = "story"
title = "A1"
description = "x"
verify = "x"
after = []
[[entry]]
id = 2
type = "story"
title = "A2"
description = "x"
verify = "x"
after = [1, "2.1"] # epic 1 waits on epic 2 - not declared, against build order
E
cat > $R/epic-b/tickets.toml <<'E'
[[entry]]
id = 1
type = "story"
title = "B1"
description = "x"
verify = "x"
after = []
[[entry]]
id = 2
type = "story"
title = "B2"
description = "x"
verify = "x"
after = [1, "1.2"] # the declared direction, pinned
E
uv run $T --project-root <project> status $RObserved: exit 0. epics shows after: [] and blocks: [] for both epics. unpinned_after: [], no error, no warning. next lists 1.1 and 2.1 as to_pull.
Expected
At least one of these:
tickets.pyreports a cross-epicafteron an entry whose provider epic is not in its epic's[[epic]].after(e.g.undeclared_after, next tounpinned_after). It also warns when the provider epic comes later in the initiative's table order (e.g.order_conflict). That can be legitimate, but it should be a visible decision.slice.md, "Epic into stories" says what to do when inception finds a prerequisite in another epic that the initiative does not declare: add it to the initiative'safterwith itsneeds, and reorder or merge epics if it points to a later epic. Or put it to the user.checks.dependenciesorchecks.setasks that an epic's cross-epic entry edges match its declaredafter, in both directions.
Context
This is the "machine-readable edge across the epic boundary" from my earlier preview feedback on Discord. Since #2932 and #2934 it works well in the declared direction: in this run all 27 cross-epic edges were pinned to concrete entries, and unpinned_after ended empty. The remaining issue is the reverse direction, described above.
Source: bmad-code-org/BMAD-METHOD