跳到正文
cccskills
免费在 GitHub 公开

goal-backward-verification

Verify that task outputs actually achieve stated goals through 4 progressive levels of verification

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(10)

  • SKILL.md5.3 KB
  • commands/goal-backward-verification.md126 B
  • hooks/post-execute.cjs143 B
  • hooks/pre-execute.cjs250 B
  • references/research-requirements.md337 B
  • rules/goal-backward-verification.md305 B
  • schemas/input.schema.json282 B
  • schemas/output.schema.json352 B
  • scripts/main.cjs456 B
  • templates/implementation-template.md260 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Goal-Backward Verification

Verify that task outputs actually achieve stated goals through 4 progressive levels of verification. Works backward from the goal to verify each artifact exists, is substantive, is wired into the system, and passes functional tests.

When to Invoke

Skill({ skill: 'goal-backward-verification' });

Invoke when:

  • A task claims completion and you need to verify the output
  • QA agent is validating deliverables from a pipeline
  • Post-pipeline drain gate needs artifact validation
  • Reflection-agent is scoring task completeness

Verification Levels

Level 1: Exists

Verify the expected output artifact is present on disk.

# Check file existence
test -f <expected_path> && echo "PASS: File exists" || echo "FAIL: File missing"

Pass: File exists at expected path. Fail: File missing — task did not produce expected output.

Level 2: Substantive

Verify the file contains real content, not a stub or placeholder.

Checks:

  • File has more than 10 non-empty, non-comment lines
  • File does not consist primarily of TODO, PLACEHOLDER, FIXME, or stub markers
  • For code files: at least one function/class definition present
  • For markdown: at least one heading and paragraph of content
# Count substantive lines (non-empty, non-comment)
grep -cvE '^\s*(//|#|\*|$|TODO|PLACEHOLDER|FIXME|STUB)' <file>

Pass: File has substantive content (>10 real lines). Fail: Stub detected — file exists but contains no real implementation.

Level 3: Wired

Verify the artifact is imported, referenced, or registered by the system.

Checks:

  • For .cjs/.js modules: at least 1 require() or import reference in other files
  • For skills: listed in an agent's skills: frontmatter or skill-index.json
  • For schemas: referenced by at least 1 validation script or test
  • For hooks: registered in settings.json
  • For agents: listed in agent-registry.json
# Search for references to the artifact
grep -r "require.*<module-name>" .claude/ --include="*.cjs" --include="*.js" | grep -v node_modules | grep -v _archive

Pass: At least 1 external reference found. Fail: Orphaned artifact — exists but nothing uses it.

Level 4: Functional

Verify the artifact passes its associated tests end-to-end.

Checks:

  • Locate test file(s) for the artifact (convention: tests/<mirror-path>/<name>.test.cjs)
  • Run tests with node --test <test-file>
  • Exit code 0 = pass
# Run associated tests
node --test tests/<path>/<artifact>.test.cjs

Pass: All tests pass (exit code 0). Fail: Test failures detected — artifact may be broken.

Modes

Strict Mode (default for HIGH/EPIC complexity)

All 4 levels must pass. Any failure at any level blocks the verification.

Advisory Mode (default for LOW/MEDIUM complexity)

All 4 levels are checked, but failures produce warnings instead of blocking. Useful for incremental development where wiring may not be complete yet.

Set mode via environment variable:

GOAL_VERIFICATION_MODE=strict  # or advisory

Output Format

{
  "artifact": "path/to/file",
  "levels": {
    "exists": { "passed": true },
    "substantive": { "passed": true, "lines": 45 },
    "wired": { "passed": true, "references": ["path/to/importer.cjs"] },
    "functional": { "passed": false, "reason": "2 tests failed", "exitCode": 1 }
  },
  "verdict": "PARTIAL",
  "mode": "advisory",
  "passedLevels": 3,
  "totalLevels": 4
}

Verdict values:

  • PASS — All 4 levels passed
  • PARTIAL — Some levels passed, some failed
  • FAIL — Level 1 (Exists) failed (nothing else to check)

Workflow

Step 1: Identify Artifacts

Read the task's acceptance criteria or plan file to identify expected output artifacts (files, schemas, skills, hooks).

Step 2: Run Verification Cascade

For each artifact, run Levels 1-4 in order. Stop early if Level 1 fails (no point checking substantiveness of a missing file).

Step 3: Produce Report

Generate structured JSON output with per-artifact, per-level results. Include the overall verdict.

Step 4: Log Results

In advisory mode, log warnings to session-gap-log for reflection-agent consumption. In strict mode, return FAIL verdict to block completion.

Anti-Patterns

  • Never skip Level 1 (Exists) — it gates all other checks
  • Never mark an artifact as "Wired" just because it exists in the right directory
  • Never run Level 4 (Functional) if Level 2 (Substantive) fails — a stub will have no meaningful tests
  • Never hardcode artifact paths — derive from task metadata or plan file

Related Skills

  • verification-before-completion — Evidence-based completion gates
  • proactive-audit — Framework health checks
  • tdd — Test-driven development ensuring Level 4 passes

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio422026年7月14日 更新

查看 oimiragieo 的全部技能

报告此技能的问题