Claude Skill

sdd-verify

Imported from gentleman-programming/gentle-ai/internal/assets/skills/sdd-verify.

LLM Mart · 0 points · 9 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download Gentleman-Programming-gentle-ai-internal_assets_skills_sdd-verify-e772935.zip · 7 KB
Part of gentleman-programming/gentle-ai — 36 skills

Install

skills CLI npx skills add https://github.com/Gentleman-Programming/gentle-ai/tree/main/internal/assets/skills/sdd-verify
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install gentleman-programming-gentle-ai@llmmart
Git git clone https://github.com/Gentleman-Programming/gentle-ai.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole gentleman-programming/gentle-ai collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Execution Role

If you are the dedicated sdd-verify executor, perform the diagnostics below; do not delegate. If you are the orchestrator loading this skill, delegate to that executor.

Activation Contract

Run when the orchestrator explicitly requests verification. Verification is optional, not a prerequisite for archive.

Language Domain Contract

Generated technical artifacts default to English. Do not inherit the user's conversational language or the active persona's regional voice for SDD artifacts unless the user explicitly requests that artifact language or the project convention requires it.

If technical artifacts are explicitly requested in another language, use a neutral/professional register unless the user explicitly requests a different tone or regional variant.

Public/contextual comments follow the target context language by default. Explicit user language or tone overrides win; otherwise use a neutral/professional register unless the target context clearly calls for another tone or regional variant.

Hard Rules

  • Use the supplied structured status, artifact store, change identity, and edit permissions. Verification grants no mutation authority; do not fix code or tasks.
  • Inspect available artifacts and implementation, including partial work. Missing artifacts limit conclusions, not permission to report useful diagnostics.
  • Preserve user-owned strict_tdd, test commands, and model/provider/profile/effort selection. When Strict TDD is active, load strict-tdd-verify.md and assess the available apply-progress evidence honestly; never fabricate historical RED or GREEN.
  • Report actual command results and limitations. Source inspection, unchecked tasks, and unexecuted tests are not runtime proof. Missing tooling means unavailable checks, not PASS.
  • Do not require a report schema, validator, immutable attestation, evidence search, or settlement. Missing, stale, malformed, or failed reports do not gate archive.
  • SDD never offers, launches, or consumes RDD. Findings do not start automatic review, refuter, or correction loops.
  • Apply rules.verify from openspec/config.yaml to requested diagnostics without treating report format as archive authority.

Decision Gates

Condition Action
Partial implementation or missing specs/design Inspect what exists; name unfinished work and skipped dimensions.
Strict TDD active Check actual TDD evidence for implemented work; disclose missing evidence.
Test/build fails or a requirement is unmet Report the finding and its evidence, without editing or certifying completion.
Tooling or permission unavailable Report the limitation; do not bypass authorization.
Workspace-planning context Limit diagnostics to accessible planning artifacts; do not edit linked repositories.

Execution Steps

  1. Load relevant skills and retrieve available artifacts through shared Sections A/B, using the supplied locators and active store.
  2. Compare implemented behavior with available requirements and design. Record task completion as observed; do not rewrite checkboxes.
  3. Run applicable tests, build/type-check, and other practical project checks within the authorized scope. Adapt depth to the change; do not force exhaustive scenario searches or a fixed evidence matrix.
  4. Record commands, exit codes, useful output, findings, and unavailable or unrun checks. Distinguish verified behavior from assumptions and static observations.
  5. Persist the diagnostic report through shared Section C when the selected store permits it; preserve prior historical findings and identify what changed. Do not rewrite old user reports merely to satisfy a format. Return shared Section D.

Output Contract

Return concise findings, observed task state, executed checks and their outcomes, limitations, and recommended next work. A diagnostic report may be partial or failed; neither blocks archive. Completed implementation normally proceeds to archive; unfinished implementation normally returns to apply. Archive records the actual state, never a synthetic PASS.

References

Files (gentle-ai)
  • references
    • report-format.md 1.3 KB
      # Optional SDD Diagnostic Report
      
      Use only sections useful for the requested checks. This outline is not a schema or an archive certificate.
      
      - **Scope:** change, implementation inspected, available artifacts, and TDD mode.
      - **Observed progress:** completed and unfinished tasks; do not alter their recorded state.
      - **Checks:** exact commands, exit codes, relevant output, and skipped/unavailable checks with reasons.
      - **Findings:** concrete behavior, requirement or design discrepancies, severity, and supporting evidence. Separate runtime proof from static observations and assumptions.
      - **Historical context:** identify prior report claims and their dates/sources; preserve unresolved findings and explain any changed conclusion.
      - **Summary:** what was verified, what failed or remains unknown, and recommended next work.
      
      Do not invent output hashes, passing executions, or historical TDD evidence. A missing test or unavailable tool is a limitation, not proof of correctness. Findings are diagnostic; archive may record them without a verification verdict or mandatory remediation cycle. No RDD state is read or required.
      
      When Strict TDD is active, use `strict-tdd-verify.md` to assess available TDD evidence for implemented work without claiming that unobserved RED/GREEN execution occurred.
      
  • SKILL.md 4.6 KB
    ---
    name: sdd-verify
    description: "Trigger: explicitly requested SDD verification. Run optional practical diagnostics against available implementation and artifacts."
    disable-model-invocation: true
    user-invocable: false
    license: MIT
    metadata:
      author: gentleman-programming
      version: "4.0"
      delegate_only: true
    ---
    
    ## Execution Role
    
    If you are the dedicated `sdd-verify` executor, perform the diagnostics below; do not delegate. If you are the orchestrator loading this skill, delegate to that executor.
    
    ## Activation Contract
    
    Run when the orchestrator explicitly requests verification. Verification is optional, not a prerequisite for archive.
    
    ## Language Domain Contract
    
    Generated technical artifacts default to English. Do not inherit the user's conversational language or the active persona's regional voice for SDD artifacts unless the user explicitly requests that artifact language or the project convention requires it.
    
    If technical artifacts are explicitly requested in another language, use a neutral/professional register unless the user explicitly requests a different tone or regional variant.
    
    Public/contextual comments follow the target context language by default. Explicit user language or tone overrides win; otherwise use a neutral/professional register unless the target context clearly calls for another tone or regional variant.
    
    ## Hard Rules
    
    - Use the supplied structured status, artifact store, change identity, and edit permissions. Verification grants no mutation authority; do not fix code or tasks.
    - Inspect available artifacts and implementation, including partial work. Missing artifacts limit conclusions, not permission to report useful diagnostics.
    - Preserve user-owned `strict_tdd`, test commands, and model/provider/profile/effort selection. When Strict TDD is active, load `strict-tdd-verify.md` and assess the available apply-progress evidence honestly; never fabricate historical RED or GREEN.
    - Report actual command results and limitations. Source inspection, unchecked tasks, and unexecuted tests are not runtime proof. Missing tooling means unavailable checks, not PASS.
    - Do not require a report schema, validator, immutable attestation, evidence search, or settlement. Missing, stale, malformed, or failed reports do not gate archive.
    - SDD never offers, launches, or consumes RDD. Findings do not start automatic review, refuter, or correction loops.
    - Apply `rules.verify` from `openspec/config.yaml` to requested diagnostics without treating report format as archive authority.
    
    ## Decision Gates
    
    | Condition | Action |
    |---|---|
    | Partial implementation or missing specs/design | Inspect what exists; name unfinished work and skipped dimensions. |
    | Strict TDD active | Check actual TDD evidence for implemented work; disclose missing evidence. |
    | Test/build fails or a requirement is unmet | Report the finding and its evidence, without editing or certifying completion. |
    | Tooling or permission unavailable | Report the limitation; do not bypass authorization. |
    | Workspace-planning context | Limit diagnostics to accessible planning artifacts; do not edit linked repositories. |
    
    ## Execution Steps
    
    1. Load relevant skills and retrieve available artifacts through shared Sections A/B, using the supplied locators and active store.
    2. Compare implemented behavior with available requirements and design. Record task completion as observed; do not rewrite checkboxes.
    3. Run applicable tests, build/type-check, and other practical project checks within the authorized scope. Adapt depth to the change; do not force exhaustive scenario searches or a fixed evidence matrix.
    4. Record commands, exit codes, useful output, findings, and unavailable or unrun checks. Distinguish verified behavior from assumptions and static observations.
    5. Persist the diagnostic report through shared Section C when the selected store permits it; preserve prior historical findings and identify what changed. Do not rewrite old user reports merely to satisfy a format. Return shared Section D.
    
    ## Output Contract
    
    Return concise findings, observed task state, executed checks and their outcomes, limitations, and recommended next work. A diagnostic report may be partial or failed; neither blocks archive. Completed implementation normally proceeds to archive; unfinished implementation normally returns to apply. Archive records the actual state, never a synthetic PASS.
    
    ## References
    
    - [references/report-format.md](references/report-format.md) — optional report outline.
    - [strict-tdd-verify.md](strict-tdd-verify.md) — only when Strict TDD is active.
    - `../_shared/sdd-phase-common.md` — skill loading, retrieval, persistence, and return envelope.
    
  • strict-tdd-verify.md 12.6 KB
    # Strict TDD Module — Verify Phase
    
    > **This module is loaded ONLY when Strict TDD Mode is enabled AND a test runner is available.**
    > If you are reading this, the orchestrator already verified both conditions. Follow every instruction.
    
    ## TDD Verification Philosophy
    
    When Strict TDD Mode is active, verification goes beyond "does the code work?" to "was the code built correctly?" — meaning: was TDD actually followed? The apply phase reports TDD evidence; your job is to validate that evidence against reality.
    
    ## Step 5a: TDD Compliance Check (includes Assertion Quality Audit)
    
    Read the `apply-progress` artifact and verify that TDD was actually followed:
    
    ```
    Read apply-progress artifact:
    ├── Find the "TDD Cycle Evidence" table
    ├── FOR EACH task row:
    │   ├── RED column:
    │   │   ├── Must say "✅ Written"
    │   │   ├── Verify: test file EXISTS in the codebase
    │   │   └── Flag: CRITICAL if test file does not exist
    │   │
    │   ├── GREEN column:
    │   │   ├── Must say "✅ Passed"
    │   │   ├── Cross-reference with Step 5b test execution results:
    │   │   │   └── The test file listed must PASS when you run it
    │   │   └── Flag: CRITICAL if test fails now (was it really green?)
    │   │
    │   ├── TRIANGULATE column:
    │   │   ├── If "✅ N cases" → verify N test cases exist in the test file
    │   │   ├── If "➖ Single" → verify spec truly has only one scenario for this task
    │   │   └── Flag: WARNING if spec has multiple scenarios but only 1 test case
    │   │
    │   ├── SAFETY NET column:
    │   │   ├── If "✅ N/N" → existing tests were run before modification (good)
    │   │   ├── If "N/A (new)" → verify the file was actually NEW (not modified)
    │   │   └── Flag: WARNING if file was modified but safety net shows "N/A"
    │   │
    │   └── REFACTOR column:
    │       ├── Not strictly verifiable (subjective quality)
    │       └── Skip verification, trust the report
    │
    ├── If NO "TDD Cycle Evidence" table found:
    │   └── Flag: CRITICAL — apply phase did not report TDD evidence
    │       (Strict TDD was enabled but apply did not follow the protocol)
    │
    └── Summary: "{N}/{total} tasks have complete TDD evidence"
    ```
    
    ## Step 5 Expanded: Test Layer Validation
    
    Classify ALL test files related to this change by their testing layer:
    
    ```
    Scan test files created/modified by this change:
    ├── Classify each test file:
    │   ├── Unit test: tests a single function/class in isolation
    │   │   └── Indicators: no render(), no page., no HTTP calls, mocked dependencies
    │   ├── Integration test: tests component interaction or user behavior
    │   │   └── Indicators: render(), screen., userEvent., testing-library imports
    │   ├── E2E test: tests full system through real browser/HTTP
    │   │   └── Indicators: page.goto(), playwright/cypress imports, browser context
    │   └── Unknown: cannot classify → report as-is
    │
    ├── Report distribution:
    │   ├── Unit: {N} tests across {N} files
    │   ├── Integration: {N} tests across {N} files
    │   ├── E2E: {N} tests across {N} files
    │   └── Total: {N} tests
    │
    ├── Cross-reference with capabilities:
    │   ├── If integration tests exist but tools not in capabilities → how?
    │   ├── If E2E tests exist but tools not in capabilities → how?
    │   └── Flag: WARNING if tests use tools not detected in capabilities
    │
    └── For each spec scenario: note which layer covers it
        └── Flag: SUGGESTION if critical business logic only has unit tests
            (only if integration/E2E tools are available)
    ```
    
    ## Step 5d Expanded: Changed File Coverage
    
    When coverage tool is available, report coverage for CHANGED files specifically:
    
    ```
    IF coverage tool available (from cached capabilities):
    ├── Run: {test_command} --coverage (or equivalent)
    ├── Parse the coverage report
    ├── Filter to ONLY files created or modified in this change
    │   (get file list from apply-progress "Files Changed" table)
    ├── Report per-file:
    │   ├── File path
    │   ├── Line coverage %
    │   ├── Branch coverage % (if available)
    │   ├── Uncovered line ranges (specific lines, not just %)
    │   └── Flag per file:
    │       ├── ≥ 95% → ✅ Excellent
    │       ├── ≥ 80% → ⚠️ Acceptable
    │       └── < 80% → ⚠️ Low (list uncovered lines)
    ├── Report aggregate:
    │   ├── Average coverage of changed files
    │   ├── Total uncovered lines in changed files
    │   └── Compare to threshold if configured
    └── Flag: WARNING if any changed file < 80% coverage
    
    IF coverage tool NOT available:
    └── Report: "Coverage analysis skipped — no coverage tool detected"
        (NOT a failure — just not available)
    ```
    
    ## Step 5e: Quality Metrics (if tools available)
    
    Run quality checks ONLY on changed files, ONLY if tools are available:
    
    ```
    Read quality tools from cached capabilities:
    
    IF linter available:
    ├── Run linter on changed files only
    ├── Report: errors and warnings
    └── Flag: WARNING for errors, SUGGESTION for warnings
    
    IF type checker available:
    ├── Run type checker (usually whole-project, not per-file)
    ├── Filter output to changed files
    ├── Report: type errors in changed files
    └── Flag: WARNING for type errors
    
    IF neither available:
    └── Report: "Quality metrics skipped — no tools detected"
    ```
    
    ## Report Template Extension
    
    When Strict TDD Mode is active, your verification report MUST include these additional sections:
    
    ```markdown
    ### TDD Compliance
    | Check | Result | Details |
    |-------|--------|---------|
    | TDD Evidence reported | ✅ / ❌ | {Found in apply-progress / Missing} |
    | All tasks have tests | ✅ / ❌ | {N}/{total} tasks have test files |
    | RED confirmed (tests exist) | ✅ / ⚠️ | {N}/{total} test files verified |
    | GREEN confirmed (tests pass) | ✅ / ❌ | {N}/{total} tests pass on execution |
    | Triangulation adequate | ✅ / ⚠️ / ➖ | {N} tasks triangulated / {N} single-case |
    | Safety Net for modified files | ✅ / ⚠️ | {N}/{total} modified files had safety net |
    
    **TDD Compliance**: {N}/{total} checks passed
    
    ---
    
    ### Test Layer Distribution
    | Layer | Tests | Files | Tools |
    |-------|-------|-------|-------|
    | Unit | {N} | {N} | {tool} |
    | Integration | {N} | {N} | {tool or "not installed"} |
    | E2E | {N} | {N} | {tool or "not installed"} |
    | **Total** | **{N}** | **{N}** | |
    
    ---
    
    ### Changed File Coverage
    | File | Line % | Branch % | Uncovered Lines | Rating |
    |------|--------|----------|-----------------|--------|
    | `path/to/file.ext` | 95% | 90% | — | ✅ Excellent |
    | `path/to/other.ext` | 82% | 75% | L45-48, L62 | ⚠️ Acceptable |
    | `path/to/new.ext` | 100% | 100% | — | ✅ Excellent |
    
    **Average changed file coverage**: {N}%
    {or "Coverage analysis skipped — no coverage tool detected"}
    
    ---
    
    ### Assertion Quality
    | File | Line | Assertion | Issue | Severity |
    |------|------|-----------|-------|----------|
    | ... | ... | ... | ... | ... |
    
    **Assertion quality**: {N} CRITICAL, {N} WARNING
    {or "✅ All assertions verify real behavior"}
    
    ---
    
    ### Quality Metrics
    **Linter**: ✅ No errors / ⚠️ {N} warnings / ❌ {N} errors / ➖ Not available
    **Type Checker**: ✅ No errors / ❌ {N} errors / ➖ Not available
    ```
    
    ## Step 5f: Assertion Quality Audit (MANDATORY)
    
    Scan ALL test files created or modified by this change and check for trivial/meaningless assertions:
    
    ```
    FOR EACH test file related to the change:
    ├── Read the file content
    ├── Scan for BANNED assertion patterns:
    │   ├── Tautologies: expect(true).toBe(true), assert True, expect(1).toBe(1)
    │   ├── Orphan empty checks: expect(result).toEqual([]) or assert len(result) == 0
    │   │   └── UNLESS there is a companion test with same setup that asserts NON-EMPTY
    │   ├── Type-only assertions used alone: toBeDefined(), not.toBeNull(), typeof checks
    │   │   └── These are OK if COMBINED with value assertions in the same test
    │   ├── Assertions that never call production code (no function call, no render, no request)
    │   ├── Ghost loops: assertions inside for/forEach over queryAll/filter results
    │   │   └── Check if the collection could be empty — if so, the assertions NEVER RUN
    │   │       Flag: CRITICAL — a loop over an empty array is a test that ALWAYS passes
    │   ├── Incomplete TDD cycle: test passes because preconditions prevent code from running
    │   │   └── e.g., testing behavior of a component that is never rendered due to state
    │   │       Flag: CRITICAL — test must set up conditions where the code path IS exercised
    │   ├── Smoke-test-only: render() + toBeInTheDocument() without behavioral assertions
    │   │   └── "Renders without crash" is NOT a valid test — it must assert WHAT was rendered
    │   │       Flag: WARNING — smoke tests do not count toward TDD coverage
    │   ├── Implementation detail coupling: assertions on CSS classes, internal state, mock call counts
    │   │   └── expect(el.className).toContain("text-xs") or expect(mock.calls.length).toBe(3)
    │   │       Flag: WARNING — tests must assert behavior, not implementation
    │   └── Mock/assertion ratio: count vi.mock() calls vs expect() calls per test file
    │       └── If mocks > 2× assertions → Flag: WARNING — "Mock-heavy test ({N} mocks, {N} assertions)"
    │           Recommend: extract logic to pure function or move to higher test layer
    │
    ├── For each violation found:
    │   ├── Record: file, line number, the assertion, why it's trivial
    │   └── Classify:
    │       ├── CRITICAL: tautology (expect(true).toBe(true)) — test proves NOTHING
    │       ├── CRITICAL: assertion without production code call — test exercises nothing
    │       ├── CRITICAL: ghost loop — assertions inside loop over possibly-empty collection
    │       ├── WARNING: empty collection without companion non-empty test
    │       ├── WARNING: type-only assertion without value assertion
    │       ├── WARNING: smoke-test-only — render + toBeInTheDocument without behavioral check
    │       ├── WARNING: CSS class / implementation detail assertion
    │       └── WARNING: mock-heavy test (mocks > 2× assertions) — wrong test layer
    │
    ├── Check triangulation quality:
    │   ├── Count distinct test cases per behavior
    │   ├── If only 1 test case exists for a behavior with multiple spec scenarios:
    │   │   └── Flag: WARNING — "Insufficient triangulation for {behavior}"
    │   ├── If all test cases assert the SAME type of value (e.g., all check empty arrays):
    │   │   └── Flag: WARNING — "No variance in test expectations — all assert empty/trivial"
    │   └── A well-triangulated behavior has tests asserting DIFFERENT expected values
    │
    └── Summary: "{N} trivial assertions found across {N} files"
    ```
    
    ### Assertion Quality Report Table
    
    Include this table in the verification report when any issues are found:
    
    ```markdown
    ### Assertion Quality
    | File | Line | Assertion | Issue | Severity |
    |------|------|-----------|-------|----------|
    | `path/test.ts` | 15 | `expect(true).toBe(true)` | Tautology — proves nothing | CRITICAL |
    | `path/test.ts` | 23 | `expect(result).toEqual([])` | Empty without companion non-empty test | WARNING |
    | `path/test.ts` | 31 | `expect(result).toBeDefined()` | Type-only — no value asserted | WARNING |
    
    **Assertion quality**: {N} CRITICAL, {N} WARNING
    ```
    
    If zero issues found, report: "**Assertion quality**: ✅ All assertions verify real behavior"
    
    ## Rules (Strict TDD Verify specific)
    
    - ALWAYS check the TDD Cycle Evidence table from apply-progress — it's the primary artifact
    - ALWAYS cross-reference reported test files against actual execution — don't trust the report blindly
    - ALWAYS run the Assertion Quality Audit (Step 5f) — trivial tests are WORSE than missing tests
    - If apply-progress has no TDD evidence table, flag as CRITICAL — the protocol was not followed
    - If tautology assertions are found (expect(true).toBe(true)), flag as CRITICAL — these MUST be rewritten
    - Coverage and quality metrics are informational, NOT blocking — only flag as WARNING, never CRITICAL
    - Test layer distribution is informational — SUGGESTION level only
    - DO NOT fix issues — only report. The orchestrator decides.
    - If coverage/quality tools are not available, say so cleanly and move on — never flag missing tools as failures
    - Apply any `rules.verify` from `openspec/config.yaml`
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related