validate-artifact
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 or a tracker work item. Runs all checks non-blocking and emits a terminal report + persisted report. One artifact per invocation.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- validate-artifact
- license
- MIT
- description
- 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 or a tracker work item. Runs all checks non-blocking and emits a terminal report + persisted report. One artifact per invocation.
02 资源文件 3
- 参考文档manifest.json658 B
- 参考文档references/report-format.md1.9 KB
- 参考文档references/validation-checks.md3.8 KB
03 SKILL.md 正文
validate-artifact
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.tracker-contract.md— the tracker gateway: every read goes through itstracker_*tools.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.
PHASE 1 — INGEST
Input: one local draft path or one provider item identifier.
Determine source from the argument:
If local draft (file path argument):
- Read the markdown file. Parse frontmatter: extract
work_item_type,parent_id,provider_id,story_points. Parse body: identify sections by emoji + label headings. - Derive artifact type from
work_item_typefrontmatter value.
If a tracker id or link:
- Call
tracker_get_work_item(ref=<id>). - Extract:
kind,title,description, the Story's points (the estimate fieldtracker_describenames),parent_id. - Artifact type =
kind.
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" | "tracker"
filename: string | null (artifacts path only — basename without path)
provider: the selected tracker's name
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 the tracker item's kind."
If given multiple IDs or paths: process only the first and warn —
"validate-artifact processes one artifact per invocation."
PHASE 2 — VALIDATE
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.
a) STRUCTURAL
Local draft only:
frontmatter-type-present— FAIL iftype:key absent from frontmatter.frontmatter-status-absent— FAIL ifstatus:key present in frontmatter.filename-regex— FAIL if filename does not match^(\d+|tech-debt|bug|task|spike)-[a-z0-9-]+. If source is the tracker (no filename): emit SKIP.
All sources:
- If User Story: check each of the 7 required sections present in body.
Emit
body-section-missing: <section name>FAIL for each absent section. - If Feature or Epic: check title non-empty AND description non-empty. FAIL if either absent.
b) HIERARCHY
If parent_id is null where a parent is required: emit WARN hierarchy-skipped-no-parent-id and skip
this entire category.
User Story:
- When the artifact has a parent:
tracker_get_work_item(ref=artifact.parent_id); assert its kind isfeature. - Check
hierarchy-story-parent-is-feature— PASS with no parent (a Story may stand alone); FAIL if the parent is not a Feature.
Feature:
- When the artifact has a parent:
tracker_get_work_item(ref=artifact.parent_id); assert its kind isepic. - Check
hierarchy-feature-parent-is-epic— PASS with no parent; FAIL if the parent is not an Epic.
Epic:
- Fetch children with
tracker_list_children. Assert no child has kinduser_story. - Check
hierarchy-epic-no-direct-stories— FAIL if direct Story children found.
Task: assert its immediate parent is a User Story.
If a tracker call fails (network / permission): emit SKIP <check> — tracker unavailable: <error> and
continue. Do not abort the run.
c) CONTENT
User Story only:
content-complexidade-breakdown— scan📊 Complexidadesection for driver keywords (Escopo, Incerteza, Integrações, Dados, QA, Rollout). FAIL if absent.content-story-points-set— assertstory_points > 0. FAIL if unset or 0.content-descricao-original-present— assert📄 Descrição Originalsection 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 forTBD,to be defined,a definiroutside@TODOannotation context. WARN if found.
d) DoR (Definition of Ready)
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) — assertstory_points > 0. FAIL if not met.
PHASE 3 — REPORT
Read ./references/report-format.md for the exact output template before printing.
Print to terminal:
- Header:
Validating <type> — "<title>" [<source>] - Separator: 60
=characters. - Findings grouped by category (STRUCTURAL / HIERARCHY / CONTENT / DoR).
Each line:
[PASS|FAIL|WARN|SKIP] <check-name> — <detail> - Separator: 60
-characters. - Summary:
Summary: X passed · Y failed · Z warnings - Outcome:
Outcome: PASS(zero FAILs) orOutcome: FAIL(≥1 FAIL)
PHASE 4 — PERSIST
Read ./references/report-format.md for the report frontmatter template.
Path: .harness/backlog/reports/ (plugin-owned; written by --persist)
Filename: <YYYY-MM-DD>-validate-<id-or-slug>.md
- Use
provider_idif available. - Otherwise: derive slug from filename (strip extension) or from title (lowercase, spaces → hyphens, max 40 chars).
Frontmatter:
---
date: <YYYY-MM-DD>
type: report
artifact: <tracker key or draft filename>
artifact_type: <Epic|Feature|User Story|Task>
source: <artifacts path|tracker>
outcome: <pass|fail>
---
Body: reproduce the full terminal output from Phase 3 verbatim inside a fenced code block.
Do NOT include status: in frontmatter.
Guardrails
- No mutations. This skill reads and reports only. Never write, update, or link work items.
- Non-blocking. Every check runs regardless of prior failures in the same category.
- SKIP over ERROR. If a provider connector fails, log SKIP with reason and continue.
- One artifact per run. Process only the first argument if multiple are given.
04 同仓库更多 Skills
split-story
Lateral story-sizing skill. Takes a single User Story and determines if it should be split, how many sub-stories to create, and what split pattern to use — then drafts sub-stories and hands them off. Use when the user asks "split this story", "is this story too big?", "analyze this story for sizing", or provides an artifacts path / tracker id / file path / raw text and wants a split recommendation. One story per invocation.
research-decision
Research a product, market, domain, competitor, user, or technical question in service of a named decision, producing a cited decision brief. Use when planning depends on current evidence rather than more ideation.
product-spec
Distill an idea, brief, PRD, UX contract, architecture spine, issue, or mixed notes into a compact canonical product contract with stable capabilities and companions. Use before backlog decomposition when intent is defined; update or validate an existing product spec through the same skill.
product-requirements
Create, update, or validate a right-sized Product Requirements Document with stable requirements, explicit scope, user journeys where useful, and measurable outcomes. Use for multi-person or multi-epic alignment; skip it when a concise product spec is enough.
product-brief
Create, update, or validate a concise product brief that captures a clear concept, its users, value, scope, and success criteria. Use when the user wants a one- or two-page product narrative before a PRD or product spec.
plan-initiative
Route a raw idea through the smallest useful discovery and product-planning path, ending in a compact product spec ready for backlog decomposition. Use when the user wants to explore, validate, plan, define, or architect an idea before creating work items or starting implementation.