Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计未展示

ring%3adev-implementation环%3adev 实施

Agent Skill

ring%3adev-implementation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

899

周安装

36

GitHub Stars

180

下载量

291
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ring%3adev-implementation(环%3adev 实施)
来源仓库:https://github.com/lerianstudio/ring
仓库路径:skills/ring%3Adev-implementation
安装命令:
npx skills add https://github.com/lerianstudio/ring --skill ring:dev-implementation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lerianstudio/ring --skill ring:dev-implementation

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合整理实施进度与变更内容。

  • 支持围绕代码协作流程进行信息组织与问题排查。
  • 通过 GitHub 仓库获取技能定义,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件操作。
  • ring%3adev-implementation 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Code Implementation (Gate 0)

Overview

This skill executes the implementation phase of the development cycle:

  • Selects the appropriate specialized agent based on task content
  • Applies project standards from docs/PROJECT_RULES.md
  • Follows TDD methodology (RED → GREEN → REFACTOR)
  • Documents implementation decisions

CRITICAL: Role Clarification

This skill ORCHESTRATES. Agents IMPLEMENT.

WhoResponsibility
This SkillSelect agent, prepare prompts, track state, validate outputs
Implementation AgentWrite tests, write code, follow standards

Step 1: Validate Input

<verify_before_proceed>

  • unit_id exists
  • requirements exists
  • language is valid (go|typescript|python)
  • service_type is valid (api|worker|batch|cli|frontend|bff) </verify_before_proceed>
REQUIRED INPUT (from ring:dev-cycle orchestrator):
- unit_id: [task/subtask being implemented]
- requirements: [acceptance criteria or task description]
- language: [go|typescript|python]
- service_type: [api|worker|batch|cli|frontend|bff]

OPTIONAL INPUT:
- technical_design: [path to design doc]
- existing_patterns: [patterns to follow]
- project_rules_path: [default: docs/PROJECT_RULES.md]

if any REQUIRED input is missing:
  → STOP and report: "Missing required input: [field]"
  → Return to orchestrator with error

Step 2: Validate Prerequisites

<block_condition>

  • PROJECT_RULES.md does not exist at project_rules_path </block_condition>

If condition is true, STOP and return error to orchestrator.

1. Check PROJECT_RULES.md exists:
   Read tool → project_rules_path (default: docs/PROJECT_RULES.md)

   if not found:
     → STOP with blocker: "Cannot implement without project standards"
     → Return error to orchestrator

2. Select implementation agent based on language:

   | Language | Service Type | Agent |
   |----------|--------------|-------|
   | go | api, worker, batch, cli | ring:backend-engineer-golang |
   | typescript | api, worker | ring:backend-engineer-typescript |
   | typescript | frontend, bff | frontend-bff-engineer-typescript |

   Store: selected_agent = [agent name]

Step 3: Initialize Implementation State

implementation_state = {
  unit_id: [from input],
  agent: selected_agent,
  tdd_red: {
    status: "pending",
    test_file: null,
    failure_output: null
  },
  tdd_green: {
    status: "pending",
    implementation_files: [],
    pass_output: null
  },
  files_created: [],
  files_modified: [],
  commit_sha: null
}

Step 4: Gate 0.1 - TDD-RED (Write Failing Test)

<dispatch_required agent="[selected_agent]"> Write failing test for unit_id following TDD-RED methodology. </dispatch_required>

Task:
  subagent_type: "[selected_agent]"  # e.g., "ring:backend-engineer-golang"
  description: "TDD-RED: Write failing test for [unit_id]"
  prompt: |
    ⛔ TDD-RED PHASE: Write a FAILING Test

    ## Input Context
    - **Unit ID:** [unit_id]
    - **Requirements:** [requirements]
    - **Language:** [language]
    - **Service Type:** [service_type]

    ## Project Standards
    Read and follow: [project_rules_path]

    ## Standards Source (Cache-First Pattern)

    **Standards Source (Cache-First Pattern):** This sub-skill reads standards from `state.cached_standards` populated by dev-cycle Step 1.5. If invoked outside a cycle (standalone), it falls back to direct WebFetch with a warning. See `shared-patterns/standards-cache-protocol.md` for protocol details.

    ## Ring Standards Reference (Modular)
    Go modules: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/{module}.md`
    For TS: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/typescript.md`

    **Cache-first loading protocol:**
    For each required standards URL:
      IF state.cached_standards[url] exists:
        → Read content from state.cached_standards[url].content
        → Log: "Using cached standard: {url} (fetched {state.cached_standards[url].fetched_at})"
      ELSE:
        → WebFetch url (fallback — should not happen if orchestrator ran Step 1.5)
        → Log warning: "Standard {url} was not pre-cached; fetched inline"

    **Go minimum for tests:** Load `quality.md` via cache-first pattern → Testing section for test conventions.
    Multi-Tenant: Implement DUAL-MODE from the start (Go only). Use resolvers for all resources — they work transparently in both single-tenant and multi-tenant mode. See TDD-GREEN prompt for full Dual-Mode Implementation section and the sub-package import table.
    Load `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/multi-tenant.md` via cache-first pattern for patterns.

    ## Frontend TDD Policy (React/Next.js only)
    If the component is purely visual/presentational (layout, styling, animations,
    static display with no behavioral logic), TDD-RED is NOT required.
    Instead, implement the component directly and defer testing to Gate 4 (Visual
    Testing / Snapshots). Report: "Visual-only component → TDD-RED skipped, Gate 4 snapshots apply."

    Behavioral components (custom hooks, form validation, state management,
    conditional rendering, API integration) MUST follow TDD-RED below.

    ## Your Task
    1. Write a test that captures the expected behavior
    2. The test MUST FAIL (no implementation exists yet)
    3. Run the test and capture the FAILURE output

    ## Requirements for Test
    - Follow project naming conventions from PROJECT_RULES.md
    - Use table-driven tests (Go) or describe/it blocks (TS)
    - Test the happy path and edge cases
    - Include meaningful assertion messages

    ## Required Output Format

    ### Test File
    **Path:** [path/to/test_file]

[test code]


    ### Test Execution
    **Command:** [test command]
    **Result:** FAIL (expected)

    ### Failure Output (MANDATORY)

[paste actual test failure output here]


    ⛔ HARD GATE: You MUST include actual failure output.
    Without failure output, TDD-RED is not complete.

Step 5: Validate TDD-RED Output

<block_condition>

  • failure_output is missing
  • failure_output does not contain "FAIL" </block_condition>

If any condition is true, re-dispatch agent with clarification.

Parse agent output:

1. Extract test file path
2. Extract failure output

if failure_output is missing or does not contain "FAIL":
  → STOP: "TDD-RED incomplete - no failure output captured"
  → Re-dispatch agent with clarification

if failure_output contains "FAIL":
  → implementation_state.tdd_red = {
      status: "completed",
      test_file: [extracted path],
      failure_output: [extracted output]
    }
  → Proceed to Step 6

Step 6: Gate 0.2 - TDD-GREEN (Implementation)

PREREQUISITE: implementation_state.tdd_red.status == "completed"

<dispatch_required agent="[selected_agent]"> Implement code to make test pass following TDD-GREEN methodology. </dispatch_required>

Task:
  subagent_type: "[selected_agent]"
  description: "TDD-GREEN: Implement code to pass test for [unit_id]"
  prompt: |
    ⛔ TDD-GREEN PHASE: Make the Test PASS

    ## Input Context
    - **Unit ID:** [unit_id]
    - **Requirements:** [requirements]
    - **Language:** [language]
    - **Service Type:** [service_type]

    ## TDD-RED Results (from previous phase)
    - **Test File:** [implementation_state.tdd_red.test_file]
    - **Failure Output:**

[implementation_state.tdd_red.failure_output]


    ## Project Standards
    Read and follow: [project_rules_path]

    ## Standards Source (Cache-First Pattern)

    **Standards Source (Cache-First Pattern):** This sub-skill reads standards from `state.cached_standards` populated by dev-cycle Step 1.5. If invoked outside a cycle (standalone), it falls back to direct WebFetch with a warning. See `shared-patterns/standards-cache-protocol.md` for protocol details.

    ## Ring Standards Reference (Modular — Load by Task Type)

    **⛔ MANDATORY: Load the MODULAR standards files below via the cache-first pattern, NOT the monolithic golang.md.**
    The standards are split into focused modules. Load the ones relevant to your task type.

    **Cache-first loading protocol (applies to every URL listed below):**
    For each required standards URL:
      IF state.cached_standards[url] exists:
        → Read content from state.cached_standards[url].content
        → Log: "Using cached standard: {url} (fetched {state.cached_standards[url].fetched_at})"
      ELSE:
        → WebFetch url (fallback — should not happen if orchestrator ran Step 1.5)
        → Log warning: "Standard {url} was not pre-cached; fetched inline"

    ### Go — Module Loading Guide
    Base URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/`

    | Task Type | REQUIRED Modules to Load (cache-first) |
    |-----------|----------------------------|
    | New feature (full) | `core.md` → `bootstrap.md` → `domain.md` → `quality.md` → `api-patterns.md` |
    | API endpoint | `core.md` → `api-patterns.md` → `domain.md` → `quality.md` |
    | Auth / Security | `core.md` → `security.md` |
    | Database work | `core.md` → `domain.md` → `domain-modeling.md` |
    | Messaging / RabbitMQ | `core.md` → `messaging.md` |
    | Infra / Bootstrap | `core.md` → `bootstrap.md` |
    | Any task | `core.md` is ALWAYS required (lib-commons, license headers, dependency management) |

    ### TypeScript
    URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/typescript.md`

    Multi-Tenant: Implement DUAL-MODE from the start. Use lib-commons v5 resolvers for ALL resources.
    Load via cache-first pattern: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/multi-tenant.md`

    ## ⛔ Multi-Tenant Dual-Mode Implementation (Go backend only — skip for TypeScript/Frontend)

    **Applies only when `language == "go"`.** TypeScript and frontend projects have different patterns.

    All Go backend code must work in BOTH modes from the start. The lib-commons v5 resolvers handle both transparently — in single-tenant mode they return the default connection, in multi-tenant mode they resolve per-tenant. There is NO post-cycle adaptation step.

    ### Sub-Package Import Reference

    | Alias | Import Path | Purpose |
    |-------|-------------|---------|
    | `tmcore` | `github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/core` | Resolvers, context helpers, types |
    | `tmmiddleware` | `github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/middleware` | TenantMiddleware, WhenEnabled |
    | `tmpostgres` | `github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/postgres` | PostgresManager |
    | `tmmongo` | `github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/mongo` | MongoManager |
    | `tmrabbitmq` | `github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/rabbitmq` | RabbitMQ Manager (vhost isolation) |
    | `valkey` | `github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/valkey` | Redis key prefixing |
    | `s3` | `github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/s3` | S3 key prefixing |

    ### Resource Resolver Rules (ALL resources the service uses)

    | Resource | Single-Tenant Pattern (WRONG) | Dual-Mode Pattern (CORRECT) |
    |----------|-------------------------------|------------------------------|
    | **PostgreSQL** | `r.connection.GetDB()` | `tmcore.GetPGContext(ctx)` with fallback to `r.connection` |
    | **PostgreSQL (multi-module)** | `r.connection.GetDB()` | `tmcore.GetPGContext(ctx, module)` with fallback to `r.connection` |
    | **MongoDB** | `r.mongoConn.GetDatabase()` | `tmcore.GetMBContext(ctx)` or `tmcore.GetMBContext(ctx, module)` with fallback |
    | **Redis/Valkey** | `redis.Set("key", val)` | `redis.Set(valkey.GetKeyContext(ctx, "key"), val)` |
    | **S3** | `s3.PutObject("path/obj")` | `s3.PutObject(s3.GetS3KeyStorageContext(ctx, "path/obj"))` |
    | **RabbitMQ** | `channel.Publish(exchange, ...)` | Use `tmrabbitmq.Manager` for vhost isolation + set `X-Tenant-ID` header |

    ### Route Registration with WhenEnabled

    Routes that need tenant context must use `WhenEnabled` — it's a no-op in single-tenant mode:

// Auth MUST run before tenant middleware (per-route, not global) app.Get("/accounts/:id", authMiddleware.Handle, // Always runs multiTenantMiddleware.WhenEnabled(), // No-op when MULTI_TENANT_ENABLED=false handler.GetAccount, )


    ### Backward Compatibility Rule

    The service must work correctly with ZERO `MULTI_TENANT_*` environment variables set. This is the single-tenant default. The resolvers handle this transparently — when `MULTI_TENANT_ENABLED` is not set or is `false`, they return the default connection.

    ### Verification (Go only)

    The agent must verify before completing Gate 0:
    - No direct `r.connection.GetDB()` or `r.mongoConn.GetDatabase()` — must use resolvers
    - No hardcoded Redis keys — must use `valkey.GetKeyContext`
    - No hardcoded S3 keys — must use `s3.GetS3KeyStorageContext`
    - No global DB singletons — connections injected via constructor
    - All methods accept `ctx context.Context` as first parameter
    - Routes use `WhenEnabled()` for tenant middleware (not global `app.Use`)
    - RabbitMQ uses `tmrabbitmq.Manager` (not direct channel operations)

    If any check fails → refactor before gate passes. Do NOT defer to a post-cycle step.

    ## ⛔ FILE SIZE ENFORCEMENT (MANDATORY)
    See [shared-patterns/file-size-enforcement.md](../shared-patterns/file-size-enforcement.md) for cohesion judgment.
    - Soft limit 1000 lines, hard block 1500 lines (including test files)
    - Files 1001-1500 lines: apply cohesion judgment — keep if the file is a single cohesive concern (state machine, parser, schema, table-driven tests, tightly-coupled domain logic) and splitting would force artificial boundaries; otherwise split
    - Splits must reduce cognitive load, not just line count
    - Split by responsibility boundaries (not arbitrary line counts)
    - **Go:** Each split file stays in the same package; all methods remain on the same receiver; verify with `go build ./... && go test ./...`
    - **TypeScript:** Split files stay in the same module/directory; update barrel exports (index.ts) if needed; verify with `tsc --noEmit && npm test`
    - Test files MUST be split to match source files
    - Files > 1500 lines = HARD BLOCK unless cohesion justification is documented in the PR description.
    - Reference: golang/domain.md → File Organization (MANDATORY), typescript.md → File Organization (MANDATORY)

    ## ⛔ CRITICAL: all Ring Standards Apply (no DEFERRAL)

    **You MUST check ALL sections from the modules you loaded.** Not just telemetry — ALL of them.
    See Ring Standards for mandatory requirements including (but not limited to):
    - lib-commons usage (HARD GATE — no duplicate utils/helpers)
    - License headers on all source files
    - Structured JSON logging with trace_id correlation
    - OpenTelemetry instrumentation (spans in every function)
    - Error handling (no panic, wrap with context, sentinel errors)
    - Context propagation
    - Input validation (validator v10)
    - SQL safety (parameterized queries)
    - Secret redaction in logs
    - HTTP status code consistency (201 create, 200 update)
    - Handler constructor pattern (DI via constructor)
    - File organization (≤1000 lines per file; 1001-1500 cohesion review; >1500 hard block)
    - Function design (single responsibility, max 20-30 lines)
    - Database naming (snake_case)

    **⛔ HARD GATE:** If you output "DEFERRED" for any Ring Standard → Implementation is INCOMPLETE.

    ## Your Task
    1. Write MINIMAL code to make the test pass
    2. Follow all Ring Standards (logging, tracing, error handling)
    3. **Instrument all code with telemetry** (100% of handlers, services, repositories)
    4. Run the test and capture the PASS output

    ## ⛔ MANDATORY: Telemetry Instrumentation (NON-NEGOTIABLE)

    <cannot_skip>
    - 90%+ instrumentation coverage required
    - Load standards file via cache-first pattern (state.cached_standards → fallback WebFetch) before implementation
    - Follow exact patterns from standards
    - Output Standards Coverage Table with evidence
    </cannot_skip>

    **every function that does work MUST be instrumented with telemetry.**
    This is not optional. This is not "nice to have". This is REQUIRED.

    ### What "Instrumented" Means
    1. **Extract logger/tracer from context** (not create new ones)
    2. **Create a child span** for the operation
    3. **Defer span.End()** immediately
    4. **Use structured logging** correlated with trace
    5. **Handle errors with span attribution** (business vs technical)

    ### Language-Specific Patterns (MANDATORY)

    **⛔ HARD GATE: Agent MUST load modular standards files (cache-first, WebFetch fallback) BEFORE writing any code.**

    Use the Module Loading Guide above to determine which modules to load.
    **Minimum for ANY Go task:** `core.md` (lib-commons, license headers, deps, MongoDB patterns)

    | Language | Standards Modules | REQUIRED Sections to Load (cache-first) |
    |----------|-------------------|-------------------------------|
    | **Go** | See Module Loading Guide above | ALL sections from loaded modules (use `standards-coverage-table.md` → `ring:backend-engineer-golang` section index) |
    | **TypeScript** | `typescript.md` | ALL 15 sections from `standards-coverage-table.md` → `ring:backend-engineer-typescript` |
    | **All** | N/A (post-cycle ring:dev-multi-tenant) | Multi-tenant adaptation happens after dev-cycle completes |

    **⛔ NON-NEGOTIABLE: Agent MUST implement EXACTLY the patterns from standards. no deviations. no shortcuts.**

    | Requirement | Enforcement |
    |-------------|-------------|
    | Load modular standards files (cache-first, WebFetch fallback) | MANDATORY before implementation |
    | Follow exact patterns | REQUIRED - copy structure from standards |
    | Output Standards Coverage Table | REQUIRED - with file:line evidence for ALL loaded sections |
    | 90%+ instrumentation coverage | HARD GATE - implementation REJECTED if below |
    | All loaded sections ✅ or N/A | HARD GATE - any ❌ = REJECTED |

    ### ⛔ FORBIDDEN Patterns (HARD BLOCK)

    **Agent MUST load standards (cache-first, WebFetch fallback) and check Anti-Patterns table. Violations = REJECTED.**

    - **Go:** `golang.md` → "Anti-Patterns" table - MUST check all rows
    - **TypeScript:** `typescript.md` → "Anti-Patterns" table - MUST check all rows

    **If agent uses any forbidden pattern → Implementation is INVALID. Start over.**

    ### Verification (MANDATORY)

    **Agent MUST output Standards Coverage Table per `standards-coverage-table.md`.**

    - all sections MUST show ✅ or N/A
    - any ❌ = Implementation REJECTED
    - Missing table = Implementation INCOMPLETE

    ## Required Output Format

    ### Implementation Files
    | File | Action | Lines |
    |------|--------|-------|
    | [path] | Created/Modified | +/-N |

    ### Code
    **Path:** [path/to/implementation_file]

[implementation code]


    ### Test Execution
    **Command:** [test command]
    **Result:** PASS

    ### Pass Output (MANDATORY)

[paste actual test pass output here]


    ### Standards Coverage Table (MANDATORY)

    **Standards Modules Loaded:** [list modules loaded via cache-first pattern; note cache hit/miss per module]
    **Total Sections Checked:** [N]

    | # | Section (from standards) | Status | Evidence |
    |---|------------------------|--------|----------|
    | 1 | [section name] | ✅/⚠️/❌/N/A | file:line or reason |
    | ... | ... | ... | ... |

    **Completeness:** [N] sections checked / [N] total = ✅ Complete

    ⛔ This table is MANDATORY. Missing table = Implementation INCOMPLETE.
    ⛔ Any ❌ = Implementation REJECTED. Fix before proceeding.

    ### Standards Compliance Summary

    **Quick reference derived from the Standards Coverage Table above.**
    If any item is ❌ here, it MUST also appear as ❌ in the Coverage Table with file:line evidence.

    - lib-commons Usage: ✅/❌
    - License Headers: ✅/❌
    - Structured Logging: ✅/❌
    - OpenTelemetry Spans: ✅/❌
    - Error Handling: ✅/❌
    - Context Propagation: ✅/❌
    - Input Validation: ✅/❌/N/A
    - SQL Safety: ✅/❌/N/A
    - File Size (≤1000 lines soft / ≤1500 hard; 1001-1500 cohesion review): ✅/❌

    ### Commit
    **SHA:** [commit hash after implementation]

Step 7: Validate TDD-GREEN Output

Parse agent output:

1. Extract implementation files
2. Extract pass output
3. Extract standards compliance
4. Extract commit SHA

if pass_output is missing or does not contain "PASS":
  → STOP: "TDD-GREEN incomplete - test not passing"
  → Re-dispatch agent with error details

if Standards Coverage Table is missing:
  → STOP: "Standards Coverage Table not provided - implementation INCOMPLETE"
  → Re-dispatch agent: "You MUST output a Standards Coverage Table with one row per section from the modules you loaded. See standards-coverage-table.md for format."

if any section in Standards Coverage Table is ❌:
  → STOP: "Standards not met - [list ❌ sections with evidence]"
  → Re-dispatch agent to fix specific sections

if any standards compliance summary is ❌:
  → STOP: "Standards not met - [list failing standards]"
  → Re-dispatch agent to fix

if pass_output contains "PASS" and all standards ✅ and Standards Coverage Table complete:
  → Run file-size verification (see shared-patterns/file-size-enforcement.md):
    Go: find . -name "*.go" ! -path "*/mocks*" ! -path "*/generated/*" ! -path "*/gen/*" ! -name "*.pb.go" ! -name "*.gen.go" -exec wc -l {} + | awk '$1 > 1000 && $NF != "total" {print}' | sort -rn
    TS: find . \( -name "*.ts" -o -name "*.tsx" \) ! -path "*/node_modules/*" ! -path "*/dist/*" ! -path "*/build/*" ! -path "*/generated/*" ! -path "*/__mocks__/*" ! -name "*.d.ts" ! -name "*.gen.ts" -exec wc -l {} + | awk '$1 > 1000 && $NF != "total" {print}' | sort -rn

  if any file > 1500 lines:
    → HARD BLOCK: "File [path] has [N] lines (hard block at 1500). MUST split before proceeding unless cohesion justification is documented in the PR description."
    → Re-dispatch agent with split instructions from shared-patterns/file-size-enforcement.md

  if any file 1001-1500 lines:
    → COHESION REVIEW: "File [path] has [N] lines. Apply cohesion judgment — keep if single cohesive concern (state machine, parser, schema, table-driven tests, tightly-coupled domain logic); split if fragmentable without artificial boundaries."
    → Re-dispatch agent with file path and cohesion-judgment prompt

  → Run linting verification (R4 — quality.md mandates 14 linters):
    Go: if .golangci.yml exists, run: golangci-lint run ./...
         if .golangci.yml does not exist, flag as warning (quality.md requires it)
    TypeScript: if eslint config exists, run: npx eslint . --ext .ts,.tsx

  if linting fails:
    → Re-dispatch agent: "Linting failed. Fix all lint issues before proceeding. Output: [lint errors]"

  → Run license header check (R5 — core.md License Headers MANDATORY):
    For each file in [files_created + files_modified] matching *.go, *.ts, *.tsx:
      Check first 10 lines for: copyright|licensed|spdx|license (case-insensitive)
      If not found → flag as missing

  if any file missing license header:
    → Re-dispatch agent: "Missing license headers in: [file list]. Add license headers per core.md → License Headers (MANDATORY)."

  if all checks pass:
    → implementation_state.tdd_green = {
        status: "completed",
        implementation_files: [extracted files],
        pass_output: [extracted output],
        commit_sha: [extracted SHA],
        file_size: "PASS",
        linting: "PASS",
        license_headers: "PASS"
      }
    → Proceed to Step 8

Step 7: Delivery Verification Exit Check (MANDATORY)

Before emitting the "Ready for Gate 1: YES" handoff, verify that every requirement in the task/subtask's acceptance criteria is DELIVERED (reachable, integrated, not dead code).

Checks to run

Check 1: Requirement Coverage Matrix (MANDATORY)

For each acceptance criterion in input.requirements:

  • Locate the file(s) that implement it
  • Verify it's callable from a public entry point (handler, route, CLI command)
  • Mark as ✅ DELIVERED | ⚠️ PARTIAL | ❌ NOT DELIVERED

Check 2: Dead Code Detection (MANDATORY)

For each newly-created struct/interface/function in files_changed:

  • Verify it's referenced from at least one caller (other than tests)
  • If created but uncalled → dead code item

Check 3: Integration Verification (MANDATORY)

  • New middleware MUST be wired into router/server
  • New repositories MUST be registered in DI container
  • New types MUST be exported where consumers expect them

Output (added to handoff to Gate 1)

delivery_verification:
  result: "PASS" | "PARTIAL" | "FAIL"
  requirements_total: N
  requirements_delivered: N
  requirements_missing: N
  dead_code_items: N

Decision gate

IF result!= "PASS":

  • Re-run Step 6 (TDD-GREEN) with remediation instructions
  • Max 2 retries before escalating to orchestrator

IF result == "PASS":

  • Proceed to Handoff to Next Gate

Reference

The full delivery verification checklist is embedded in Step 7 below and in Gate 0.5G of ring:dev-cycle.


Step 8: Prepare Output

Generate skill output:

## Implementation Summary
**Status:** PASS
**Unit ID:** [unit_id]
**Agent:** [selected_agent]
**Commit:** [commit_sha]

## TDD Results
| Phase | Status | Output |
|-------|--------|--------|
| RED | ✅ | [first line of failure_output] |
| GREEN | ✅ | [first line of pass_output] |

## Files Changed
| File | Action | Lines |
|------|--------|-------|
[table from implementation_files]

**Files Created:** [count]
**Files Modified:** [count]
**Tests Added:** [count]

## Standards Compliance
- Structured Logging: ✅
- OpenTelemetry Spans: ✅
- Error Handling: ✅
- Context Propagation: ✅
- File Size (≤1000 lines soft / ≤1500 hard; 1001-1500 cohesion review): ✅
## Handoff to Next Gate
- Implementation status: COMPLETE
- Code compiles: ✅
- Tests pass: ✅
- Standards met: ✅
- Ready for Gate 1 (DevOps): YES
- Environment needs: [list any new deps, env vars, services]

delivery_verification:
  result: "PASS|PARTIAL|FAIL"
  requirements_total: integer
  requirements_delivered: integer
  requirements_missing: integer
  dead_code_items: integer

Severity Calibration

SeverityCriteriaExamples
CRITICALTDD bypassed, no test exists, security vulnerabilitySkipped RED phase, missing test file, exposed credentials
HIGHStandards non-compliance, missing observabilityNo telemetry spans, missing error handling, raw OTel usage
MEDIUMCode quality issues, incomplete implementationPartial telemetry coverage, non-standard patterns
LOWStyle improvements, documentation gapsNaming conventions, missing comments

Report all severities. CRITICAL = immediate block. HIGH = fix before proceeding. MEDIUM = fix in iteration. LOW = document.


Pressure Resistance

See shared-patterns/shared-pressure-resistance.md for universal pressure scenarios.

User SaysYour Response
"Skip TDD, just implement""TDD is MANDATORY. Dispatching agent for RED phase."
"Code exists, just add tests""DELETE existing code. TDD requires test-first."
"Add observability later""Observability is part of implementation. Agent MUST add it now."

Anti-Rationalization Table

See shared-patterns/shared-anti-rationalization.md for universal anti-rationalizations.

Gate 0-Specific Anti-Rationalizations

RationalizationWhy It's WRONGRequired Action
"Test passes on first run"Passing test ≠ TDD. Test MUST fail first.Rewrite test to fail first
"Skip RED, go straight to GREEN"RED proves test validityExecute RED phase first
"I'll add observability later"Later = never. Observability is part of GREEN.Add logging + tracing NOW
"Minimal code = no logging"Minimal = pass test. Logging is a standard, not extra.Include observability
"DEFERRED to later tasks"DEFERRED = FAILED. Standards are not deferrable.Implement all standards NOW
"Using raw OTel is fine"lib-commons wrappers are MANDATORY for consistencyUse libCommons.NewTrackingFromContext
"c.JSON() works the same"Direct Fiber breaks response standardizationUse libHTTP.OK(), libHTTP.WithError()
"This function is too simple for spans"Simple ≠ exempt. all functions need spans.Add span to every function
"Telemetry adds overhead"Observability is non-negotiable for productionInstrument 100% of code paths

⛔ Post-Generation Panic Check (MANDATORY)

Before delivering ANY generated code, run these checks:

CheckCommandExpectedIf Found
No panic()grep -rn "panic(" --include="*.go" --exclude="*_test.go"0 resultsRewrite to return error
No log.Fatal()grep -rn "log.Fatal" --include="*.go"0 resultsRewrite to return error
No Must* helpers`grep -rn "Must[A-Z]" --include="*.go" \grep -v "regexp\.MustCompile"`0 resultsRewrite to return (T, error)
No os.Exit()grep -rn "os.Exit" --include="*.go" --exclude="main.go"0 resultsMove to main() or return error

If any check fails: DO NOT deliver. Fix first.

Agent Selection Guide

LanguageService TypeConditionAgent
GoAPI, Worker, Batch, CLI-ring:backend-engineer-golang
TypeScriptAPI, Worker-ring:backend-engineer-typescript
TypeScriptFrontend, BFFNo product-designer outputsring:frontend-bff-engineer-typescript
TypeScriptFrontendux-criteria.md existsring:ui-engineer
React/CSSDesign, Styling-ring:frontend-designer

ui-engineer Selection: When implementing frontend features with product-designer outputs (ux-criteria.md, user-flows.md, wireframes/), use ring:ui-engineer instead of ring:frontend-bff-engineer-typescript. The ui-engineer specializes in translating design specifications into production code while ensuring all UX criteria are satisfied.


Execution Report Format

## Implementation Summary
**Status:** [PASS|FAIL|PARTIAL]
**Unit ID:** [unit_id]
**Agent:** [agent]
**Duration:** [Xm Ys]

## TDD Results
| Phase | Status | Output |
|-------|--------|--------|
| RED | ✅/❌ | [summary] |
| GREEN | ✅/❌ | [summary] |

## Files Changed
| File | Action | Lines |
|------|--------|-------|
| [path] | [Created/Modified] | [+/-N] |

## Standards Compliance
- Structured Logging: ✅/❌
- OpenTelemetry Spans: ✅/❌
- Error Handling: ✅/❌
- Context Propagation: ✅/❌

## Handoff to Next Gate
- Implementation status: [COMPLETE|PARTIAL]
- Ready for Gate 1: [YES|no]
- Environment needs: [list]

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.9%
按下载量换算96

Claude

30.82%
按下载量换算90

Cursor

17.46%
按下载量换算51

Gemini CLI

9.79%
按下载量换算28

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills