/agile-backlog-toolkit:validate-artifactfrom agile-backlog-toolkit
Validate a single agile artifact (Epic, Feature, User Story, or Task) against the toolkit rule set. Use when the user asks to "validate this story/feature/epic", "check this ticket", "is this artifact ready?", or provides a local draft path or provider item and wants a quality report. Accepts a local draft, Azure DevOps work item, or Linear issue. Runs all checks non-blocking and emits a terminal report + persisted report. One artifact per invocation.
Ships in agile-backlog-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Quality gate for a single agile artifact. Load reference files as each phase needs them.
References (shared, in ../../references/):
decomposition-rules.md — hierarchy, DoR, sizing, story-point heuristic.ticket-structure.md — body sections, frontmatter constraints, content hygiene.azure-mechanics.md — MCP calls, linking mechanics, rendering rules.audit-checklist.md — fidelity, coverage, DoR check definitions.References (skill-specific, in ./references/):
validation-checks.md — full check catalog per artifact type + category.report-format.md — terminal output template + report template.../../common/contracts/validate-artifact/canonical-validation-report.md — read-only shape contract for reports
report bodies. Do not edit; reproduce this structure when emitting reports.Input: one local draft path or one provider item identifier.
Determine source from the argument:
If local draft (file path argument):
work_item_type, parent_id,
provider_id, story_points. Parse body: identify sections by emoji + label headings.work_item_type frontmatter value.If Azure ID (numeric argument):
wit_get_work_item(id=<id>, expand=relations).System.WorkItemType, System.Title, System.Description,
Microsoft.VSTS.Scheduling.StoryPoints, System.Parent.System.WorkItemType.Normalize into a unified artifact record:
{
type: "Epic" | "Feature" | "User Story" | "Task"
title: string
body: string (full description / body text)
story_points: number | null
parent_id: string | null
source: "artifacts path" | "azure-devops" | "linear"
filename: string | null (artifacts path only — basename without path)
provider: "local" | "azure-devops" | "linear"
provider_id: string | null
raw: original parsed content
}
If artifact type cannot be determined: STOP and report —
"Cannot detect artifact type — check work_item_type frontmatter (artifacts path) or System.WorkItemType (Azure)."
If given multiple IDs or paths: process only the first and warn —
"validate-artifact processes one artifact per invocation."
Prefer the deterministic orchestrator (rule-based critic — no LLM self-judgment):
bin/agile-backlog-toolkit validate --file <path> [--persist]
# or quality-gate with mailbox error log:
bin/agile-backlog-toolkit evaluate --skill validate-artifact --file <path>
The Python critic implements every check in ./references/validation-checks.md. On failure,
evaluate writes .agentic/workflow_prompts/validate-artifact.error.log for correcao resume.
Read ./references/validation-checks.md for the complete check definitions, conditions, and
FAIL/WARN thresholds before running checks manually.
Run all four categories in order. Each check emits { name, result, detail }.
No check halts sibling or subsequent checks on failure. Collect all findings.
Local draft only:
frontmatter-type-present — FAIL if type: key absent from frontmatter.frontmatter-status-absent — FAIL if status: key present in frontmatter.filename-regex — FAIL if filename does not match ^(\d+|tech-debt|bug|task|spike)-[a-z0-9-]+.
If source is Azure (no filename): emit SKIP.All sources:
body-section-missing: <section name> FAIL for each absent section.If parent_id is null where a parent is required: emit WARN hierarchy-skipped-no-parent-id and skip
this entire category.
User Story:
wit_get_work_item(id=artifact.parent_id). Assert System.WorkItemType == "Feature".hierarchy-story-parent-is-feature — FAIL if parent is Epic or missing.Feature:
wit_get_work_item(id=artifact.parent_id). Assert System.WorkItemType == "Epic".hierarchy-feature-parent-is-epic — FAIL if missing or wrong type.Epic:
search_workitem or relations from the ingested item.
Assert no child has System.WorkItemType == "User Story".hierarchy-epic-no-direct-stories — FAIL if direct Story children found.Task: assert its immediate parent is a User Story.
If an MCP call fails (network / permission): emit SKIP <check> — MCP unavailable: <error> and
continue. Do not abort the run.
User Story only:
content-complexidade-breakdown — scan 📊 Complexidade section for driver keywords
(Escopo, Incerteza, Integrações, Dados, QA, Rollout). FAIL if absent.content-story-points-set — assert story_points > 0. FAIL if unset or 0.content-descricao-original-present — assert 📄 Descrição Original section non-empty.
FAIL if empty.All artifact types:
content-no-machine-paths — scan body for /home/, /Users/, C:\, D:\.
WARN if found; include the matched path in detail.content-no-meta-prose — scan body for TBD, to be defined, a definir outside
@TODO annotation context. WARN if found.dor-title-clear — assert title non-empty and word count > 5. FAIL if not met.dor-description-present — assert body / description non-empty. FAIL if not met.dor-story-points-set (User Story only) — assert story_points > 0. FAIL if not met.dor-linked-to-feature (User Story only) — reuse result of hierarchy-story-parent-is-feature;
no extra MCP call. FAIL if that check failed or was skipped.Read ./references/report-format.md for the exact output template before printing.
Print to terminal:
Validating <type> — "<title>" [<source>]= characters. [PASS|FAIL|WARN|SKIP] <check-name> — <detail>- characters.Summary: X passed · Y failed · Z warningsOutcome: PASS (zero FAILs) or Outcome: FAIL (≥1 FAIL)Read ./references/report-format.md for the report frontmatter template.
Path: .agile-backlog-toolkit/reports/ (plugin-owned; written by --persist)
Filename: <YYYY-MM-DD>-validate-<id-or-slug>.md
provider_id if available.Frontmatter:
---
date: <YYYY-MM-DD>
type: report
artifact: <azure-id or artifacts path-filename>
artifact_type: <Epic|Feature|User Story|Task>
source: <artifacts path|azure-devops|linear>
outcome: <pass|fail>
---
Body: reproduce the full terminal output from Phase 3 verbatim inside a fenced code block.
Do NOT include status: in frontmatter.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub theocarranza/agile-backlog-toolkit --plugin agile-backlog-toolkit9 skills in this plugin
/amend-workitemsAnalyze user instructions and safely amend an entire Azure DevOps or local artifacts work-item tree. Use when a user supplies corrections or adjustments for an Epic or Feature and expects the Epic, Features, User Stories, and child Tasks to be scanned, placed, reviewed, and updated consistently. This skill gathers and presents a change set before any write, creates a recoverable tree backup, and never changes work items without explicit approval.
/auto-fix-artifactValidates an agile artifact (Epic, Feature, or User Story) and automatically fixes any issues found. Accepts an Azure workitem ID, artifacts path document, filesystem reference, or pasted string. If validation passes, outputs the report. If validation fails, it shows the report, asks for permission to fix, systematically corrects each problem based on the quality gate rules, and offers to save the corrected version back to Azure or the artifacts path.
/decompose-backlogDecompose a parent work item into correctly-parented, audited child Stories. Use when the user asks to "break down this Feature", "decompose Epic/Feature N into stories", "create the user stories for <feature>", "groom this backlog item", or provides a Feature/Epic id and wants Stories drafted and created in Azure DevOps. Drives 7 phases: ingest the parent, split into right-sized Stories (1 Story = 1 sprint = 1 PR), draft them in the artifacts path, enrich to the team format, create them in Azure DevOps parented to the FEATURE, verify the hierarchy, and audit that every parent requirement has a home. Self-contained rules; two approval gates before any write. For plain-language scope lines and story narrative, delegates sub-passes to generate-plain-language-documentation in DRAFT and ENRICH phases.