Agent Skillsmodu-ai/moai-adk › hns-oss-docs-verify

hns-oss-docs-verify

GitHub

文档构建验证技能,执行Hugo构建、Sitemap检查、URL黑名单扫描、Mermaid方向校验及多语言章节一致性比对,作为发布前的强制退出门禁。

.claude/skills/hns-oss-docs-verify/SKILL.md modu-ai/moai-adk

Trigger Scenarios

需要验证文档站点构建是否通过 检查多语言内容一致性 执行发布前质量门禁

Install

npx skills add modu-ai/moai-adk --skill hns-oss-docs-verify -g -y
More Options

Non-standard path

npx skills add https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/hns-oss-docs-verify -g -y

Use without installing

npx skills use modu-ai/moai-adk@hns-oss-docs-verify

指定 Agent (Claude Code)

npx skills add modu-ai/moai-adk --skill hns-oss-docs-verify -a claude-code -g -y

安装 repo 全部 skill

npx skills add modu-ai/moai-adk --all -g -y

预览 repo 内 skill

npx skills add modu-ai/moai-adk --list

SKILL.md

Frontmatter
{
    "name": "hns-oss-docs-verify",
    "metadata": {
        "tags": "oss-docs,verify,quality-gate,hugo,parity,blacklist",
        "status": "active",
        "updated": "2026-07-13",
        "version": "1.0.0",
        "category": "harness"
    },
    "description": "Mandatory verify recipe for the oss-docs harness — the runnable exit gate every specialist executes before returning: warning-free hugo build, sitemap existence, URL-blacklist grep, Mermaid LR\/RL direction grep, 4-locale file-existence and section-count parity, README 4-file heading parity, and body-emoji scan. All checks are inlined here because docs-i18n-check.sh and gen_menu.py do not exist.\n",
    "allowed-tools": "Read, Grep, Glob, Bash",
    "user-invocable": false
}

oss-docs Verify Recipe (exit gate)

Runnable checks for the sprint-contract dimensions. The scripts docs-i18n-check.sh and gen_menu.py DO NOT exist — never shell out to them; every check is inlined below. All checks are read-only; this skill never commits or pushes.

1. Build clean (build-clean, must_pass, threshold 1.0)

cd docs-site && hugo --minify --gc
  • Must exit 0 AND complete warning-free (any WARN/ERROR line = FAIL).
test -f docs-site/public/sitemap.xml && echo "sitemap OK" || echo "sitemap MISSING"

2. URL blacklist (content-fidelity)

grep -rn 'docs\.moai-ai\.dev\|adk\.moai\.com\|adk\.moai\.kr' docs-site/content README*.md
  • Expected: no matches. Only adk.mo.ai.kr is valid. Note: the pattern adk\.moai\.kr does not match adk.mo.ai.kr (different dot positions) — no false positive on the valid domain.

3. Mermaid direction (style-compliance)

grep -rn 'flowchart LR\|graph LR\|flowchart RL\|graph RL' docs-site/content
  • Expected: no matches (TD-only rule; flowchart TD / graph TB pass).

4. 4-locale parity (locale-parity, must_pass, threshold 1.0)

File-existence parity — every ko page has en/ja/zh counterparts:

cd docs-site/content && for f in $(cd ko && find . -name '*.md'); do
  for loc in en ja zh; do
    [ -f "$loc/$f" ] || echo "MISSING: $loc/$f"
  done
done

Section-count parity per page, ratcheted against a checked-in baseline.

Comparing tree totals is not a parity check: per-page divergences in opposite directions cancel, so a page where ko leads en nets out against a page where en leads ko and the total looks healthy. Compare each page against its own three counterparts instead.

The gate is a ratchet, not an absolute check. docs-site/.locale-parity-baseline lists the pages that already diverge; the gate fails on any divergent page NOT in that list. An absolute check would fail on every baselined page from the first run, and a gate that fails on day one gets switched off — which is worse than the weak check it replaces. Ratcheting means the debt is explicit and auditable, and it can only shrink.

cd docs-site/content

# Current divergence set: pages whose ko/en/ja/zh H2-and-deeper counts disagree.
# One grep pass over the whole tree — a per-file loop over 143x4 files does not
# finish inside a 2-minute budget.
grep -rc '^#\{2,\} ' ko en ja zh --include='*.md' \
| awk -F: '
    { i=index($1,"/"); loc=substr($1,1,i-1); page=substr($1,i+1)
      n[page,loc]=$2; pages[page]=1 }
    END { for (p in pages)
            if (n[p,"en"]!=n[p,"ko"] || n[p,"ja"]!=n[p,"ko"] || n[p,"zh"]!=n[p,"ko"])
              print p }' \
| sort > /tmp/parity-now.txt

grep -v '^#' ../.locale-parity-baseline | grep -v '^[[:space:]]*$' | sort > /tmp/parity-base.txt

comm -23 /tmp/parity-now.txt /tmp/parity-base.txt   # NEW divergence  -> FAIL
comm -13 /tmp/parity-now.txt /tmp/parity-base.txt   # converged pages -> prune baseline

Failure condition (explicit): the first comm prints one or more page paths. Any output there is a FAIL — a page that was previously in parity has lost it, or a newly added page landed unbalanced. Fix the page, or (only with a deliberate decision) add it to the baseline; adding a line is admitting new debt.

The second comm is informational: those pages have converged and should be pruned from the baseline so the ratchet tightens. Not pruning is not a failure.

A missing counterpart file also surfaces here (its count reads as empty and therefore disagrees), which overlaps with the file-existence check above — that redundancy is intentional.

README 4-file heading-count parity:

grep -c '^## ' README.md README.ko.md README.ja.md README.zh.md
  • Expected: identical counts across the 4 files (and identical H2 order — spot-check with grep '^## ' <file>).

5. Body-emoji scan (style-compliance)

grep -rnP '[\x{1F300}-\x{1FAFF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}]' docs-site/content --include='*.md' | grep -v '{{<' | head -40
  • Review each hit: body-text emoji = FAIL (use {{</* icon */>}}); preserved typographic symbols (→ ← ↓ ✓ ✗, U+2702 in handoff blocks) and branding emoji inside orchestrator-banner example code blocks are allowed — judge code-block context before flagging.

Scoring map (sprint contract)

Dimension Checks Threshold
locale-parity §4 (file existence clean + zero NEW section-count divergence + README parity = 1.0) 1.0 (must_pass)
build-clean §1 (build warning-free + sitemap = 1.0) 1.0 (must_pass)
style-compliance §3 + §5 (proportion of clean checks) 0.95
content-fidelity §2 + facts/figures preserved vs canonical 0.9

A must_pass dimension below threshold blocks the harness run result (must_pass_ok: false) — fix and re-verify before handing back to the orchestrator.

Version History

  • 4100d87 Current 2026-08-20 09:07

Same Skill Collection

.claude/skills/hns-lsel-curator/SKILL.md
.claude/skills/hns-moaiadk-dev-reference/SKILL.md
.claude/skills/hns-oss-docs-i18n-rules/SKILL.md
.claude/skills/hns-oss-docs-readme-sync/SKILL.md
.claude/skills/hns-oss-docs-structure-map/SKILL.md
.claude/skills/hns-workflow-ci-loop/SKILL.md
.claude/skills/moai-domain-backend/SKILL.md
.claude/skills/moai-domain-database/SKILL.md
.claude/skills/moai-domain-frontend/SKILL.md
.claude/skills/moai-domain-humanize/SKILL.md
.claude/skills/moai-domain-svg-infographic/SKILL.md
.claude/skills/moai-foundation-cc/SKILL.md
.claude/skills/moai-foundation-core/SKILL.md
.claude/skills/moai-foundation-quality/SKILL.md
.claude/skills/moai-foundation-thinking/SKILL.md
.claude/skills/moai-harness-learner/SKILL.md
.claude/skills/moai-kanban-foreman/SKILL.md
.claude/skills/moai-meta-harness/SKILL.md
.claude/skills/moai-ref-api-patterns/SKILL.md
.claude/skills/moai-ref-cross-model-audit/SKILL.md
.claude/skills/moai-ref-git-workflow/SKILL.md
.claude/skills/moai-ref-owasp-checklist/SKILL.md
.claude/skills/moai-ref-react-patterns/SKILL.md
.claude/skills/moai-ref-testing-pyramid/SKILL.md
.claude/skills/moai-ref-ui-polish/SKILL.md
.claude/skills/moai-workflow-ddd/SKILL.md
.claude/skills/moai-workflow-docs-claim-check/SKILL.md
.claude/skills/moai-workflow-loop/SKILL.md
.claude/skills/moai-workflow-project/SKILL.md
.claude/skills/moai-workflow-spec/SKILL.md
.claude/skills/moai-workflow-tdd/SKILL.md
.claude/skills/moai-workflow-testing/SKILL.md
.claude/skills/moai-workflow-worktree/SKILL.md
.claude/skills/moai/SKILL.md
.moai/archive/skills/v2.16/moai-framework-electron/SKILL.md
.moai/archive/skills/v2.16/moai-platform-auth/SKILL.md
.moai/archive/skills/v2.16/moai-platform-chrome-extension/SKILL.md
.moai/archive/skills/v2.16/moai-platform-deployment/SKILL.md
.moai/archive/skills/v3.0/moai-design-craft/SKILL.md
.moai/archive/skills/v3.0/moai-design-tools/SKILL.md
.moai/archive/skills/v3.0/moai-docs-generation/SKILL.md
.moai/archive/skills/v3.0/moai-domain-uiux/SKILL.md
.moai/archive/skills/v3.0/moai-foundation-context/SKILL.md
.moai/archive/skills/v3.0/moai-foundation-philosopher/SKILL.md
.moai/archive/skills/v3.0/moai-platform-database-cloud/SKILL.md
.moai/archive/skills/v3.0/moai-tool-svg/SKILL.md
.moai/archive/skills/v3.0/moai-workflow-jit-docs/SKILL.md
.moai/archive/skills/v3.0/moai-workflow-templates/SKILL.md
.moai/archive/skills/v3.0/moai-workflow-thinking/SKILL.md

Metadata

Files
0
Version
4100d87
Hash
ea653ae3
Indexed
2026-08-20 09:07

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 00:26
浙ICP备14020137号-1 $방문자$