armelhbobdad/bmad-module-ultracode-goal / skills/ultracode-goal
ultracode-goal
FlaggedRuns a BMAD Epic autonomously to a machine-checked Definition-of-Done. Use when the user requests to 'run an epic autonomously', 'execute this epic', 'ultracode goal', or 'autonomously deliver the epic'.
scripts/tests/fixtures/gate_run_the_gate_no_ticker.md
View on GitHub## Run the gate
Production:
```
uv run {skill-root}/scripts/gate_eval.py --trace-output {workflow.trace_output_dir} --story <story_id> --profile production --nfr {nfr-assessment.md} --test-review {test-review.md}
```
Light:
```
uv run {skill-root}/scripts/gate_eval.py --trace-output {workflow.trace_output_dir} --story <story_id> --profile light
```
Resolve `{nfr-assessment.md}` and `{test-review.md}` to the paths TEA wrote them to (under `{workflow.trace_output_dir}` or the TEA output root); pass the production-only flags only in production. The script reads `gate-decision.json` (resolving its filename from the trace report frontmatter, falling back to the `e2e-trace-summary.json` gate fields when the slim file is absent — that fallback is **not** a failure).
**`--story` in a shared multi-story trace dir.** When every story in a multi-story Epic writes a per-story-named trace report + gate decision (`trace-<id>.md`, `gate-decision-<id>.json`) into the **one** shared `{workflow.trace_output_dir}`, an unscoped read resolves the first/oldest story's gate, a false verdict for every later story. Pass `--story <story_id>` (the id of the story you are gating) so resolution is scoped to that story's artifacts; matching is on id components (`61-6` == `61.6` == `61_6`) anchored to the trailing components, so epic id `1` resolves `trace-1` and never the child story `1-1`'s report. **`<story_id>` is ONE string, used byte-identically in three places:** the story's `sprint-status.yaml` key, the `<id>` in the artifact filenames above (`trace-<id>.md`, `gate-decision-<id>.json`, and the same `<id>` in the per-story NFR and test-review names the non-web section below pins), and this `--story` argument. Copy the key verbatim, whether it is bare (`4-2`) or carries a kebab title slug (`4-2-<kebab-title>`); do not abbreviate it to its number when invoking, and do not expand it when naming. When TEA authored the files, take the id portion of the stem it actually wrote and pass that. **A mismatch fails in both directions**: `--story 4-2-<kebab-title>` resolves `gate-decision-4-2-<kebab-title>.json` and *not* `gate-decision-4-2.json`, and `--story 4-2` resolves neither. The tolerance is deliberately no wider than this: matching is anchored to the trailing components on purpose, because a prefix match would let epic id `4` resolve `trace-4-2-<kebab-title>.md` and hand the epic roll-up a child story's verdict, which is the fail-open the anchor exists to close. **Recognise the symptom:** a spelling mismatch surfaces as `gate_status: NOT_EVALUATED` -> `escalate`, worded identically to a story that genuinely wrote nothing, so before treating that `escalate` as a real block, list `{workflow.trace_output_dir}` and compare the exact stem. For the **epic-level** gate after the last story, pass the epic's own id the same way (it resolves the epic's `trace-<epic>` report, not any child story). **`--story` fails closed on a genuine no-match: this is a behaviour change.** It used to fall back to the unscoped read whenever nothing matched, which meant a story that wrote *no* artifacts at all silently reported a NEIGHBOURING story's gate as its own: an unevaluated story could read `PASS`/`advance`. Now the fallback depends on how the directory is **named**. If any artifact there is named for a story, a `--story` that matches nothing means that story is genuinely absent, and the read returns `gate_status: NOT_EVALUATED` -> `escalate`, with a reason naming the artifact KIND that made the directory per-story-named (never a neighbour's filename: quoting one in an absent story's verdict is the very fail-open this branch closes). **"Named for a story" is wider than the two gate-bearing files, and the test is not "ends in a number".** Seven prefixes count (`gate-decision`, `e2e-trace-summary`, `nfr-assessment`, `test-review`, `traceability-matrix`, `trace`, `atdd-checklist`), and the rule is that the component **immediately after the prefix starts with a digit**, so `trace-52-0a.md` and `trace-5-8-some-slug.md` both count even though neither ends in a number. Two consequences worth holding: a per-story NFR assessment or test review, alone, flips the directory per-story-named on its own even with no trace or gate file beside it, and those are artifacts the non-web section below orders into this same directory; and an id whose first component is not a digit (`trace-sb-5.md`) does not flip it, which is one more reason the isolated-track rule requires a numeric epic prefix. If instead every candidate is generically named (`trace.md`, `gate-decision.json`), the directory holds one story's artifacts and the documented unscoped fallback still applies, so passing `--story` against a single-story dir resolves exactly as before. `--story` remains optional; omit it only when `{workflow.trace_output_dir}` provably holds a single story's artifacts. If you were relying on the old silent fallback in a per-story-named dir, you will now get an `escalate` instead of a verdict, which is the point: it surfaces a story whose gate was never produced. If your TEA build does not name artifacts per story, isolate the current story's `trace-*.md` + `gate-decision*.json` into a fresh dir and point `--trace-output` there instead. It returns JSON:
```json
{"verdict": "advance|defer|reloop|escalate",
"gate_status": "PASS|CONCERNS|FAIL|WAIVED|NOT_EVALUATED",
"p0_status": "...", "p1_status": "...", "overall_status": "...",
"nfr_status": "...", "review_score": 0, "reasons": ["..."]}
```
Do not recompute TEA thresholds or re-judge `gate_status` — read it as given. The script already ANDs the production signals (an `advance` is downgraded to `reloop` if `nfr-assessment.md` overallStatus is FAIL, or `test-review.md` score < 80 or recommendation is Block). Record the full verdict JSON and its `reasons` in `.decision-log.md` for this story.
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 |