validate-sample-topic
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 31
- Forks
- 19
03 SKILL.md 正文
Skill: Validate a sample topic
Preconditions: create-or-update-sample-topic has produced a working-tree diff.
This skill is now executable. The authoritative implementation lives at
tools/validate_samples/ and is run
the same way locally, in CI, and by this skill — so results cannot drift.
Procedure
-
From the repo root, run:
python -m tools.validate_samples --diff-base origin/main -
Read its stdout — it is the summary block defined below.
-
If the process exit code is non-zero (any
FAIL), stop. Either fix the diff and re-run, or post a comment on the issue explaining the blocker. Do not open a PR. -
If all checks are
PASSorN-A, paste the stdout block verbatim into the PR body's "Validation" section. Thevalidate-samplesGitHub Action will post the same block as a sticky PR comment; the agent-pasted copy is a courtesy for reviewers.
Checks (enforced by the CLI)
- YAML well-formedness — every changed
*.yamlundersamples/parses. - AdaptiveDialog kind — every changed
topic.yamlhas top-levelkind: AdaptiveDialog. - XML well-formedness — every changed
*.xmlparses. - Filename convention (new files only) — new XML filenames start with
msdyn_and have no trailing dot. Documented inconsistencies insamples/AGENTS.mdare whitelisted intools/validate_samples/whitelist.yml. - Folder convention (new folders only) — new topic folder is PascalCase
and contains
topic.yaml, at least one*.xml, andREADME.md. - Diff scope — every changed path is under
samples/; the diff touches at most one topic folder (area-levelREADME.md/AGENTS.mdare allowed). - Secrets / internal URLs — conservative regex sweep of the full current contents of each changed file (not just the added hunks).
Neighbor-key parity against the sibling reference is not a CLI check —
it is part of step 1 of create-or-update-sample-topic.
Record the neighbor path in the PR body as instructed there.
Output: validation summary (paste into PR body)
The CLI emits exactly this block. Do not hand-craft it.
Validation
- YAML parse: PASS|FAIL|N-A
- AdaptiveDialog kind: PASS|FAIL|N-A
- XML parse: PASS|FAIL|N-A
- Filename convention (new): PASS|FAIL|N-A
- Folder convention (new, incl. README.md): PASS|FAIL|N-A
- Diff scope (samples/ only): PASS|FAIL|N-A
- Secrets / internal URLs: PASS|FAIL|N-A
Out of scope (manual follow-up)
Runtime validation in Microsoft Copilot Studio / Power Platform is not
covered by this skill or the CLI. Importing the topic, exercising the flow,
and verifying user-visible behavior remain manual steps. See
docs/validation.md.
Stop conditions
- Any
FAIL→ do not open a PR. Fix and re-run, or stop and post a comment explaining the blocker. - CLI cannot run (missing PyYAML, no git history) → stop and surface the underlying error; do not approximate the checks by hand.
04 同仓库更多 Skills
servicenow-da
暂无简介
servicenow-da-itsm
暂无简介
servicenow-da-hrsd
暂无简介
ESS-Diagnostics-Skills
暂无简介
update
暂无简介
test
暂无简介