Logo Ring:Implementing Readyz

Ring:Implementing Readyz

Tổ chức
LerianStudio
ring:implementing-readyz

Implementing the canonical /readyz readiness-probe contract across Go, TypeScript, and Next.js via a 12-gate cycle: detects stack, audits compliance, then dispatches agents to build the dependency probe, url.Parse TLS detection, ValidateSaaSTLS enforcement, metrics, startup self-probe, and graceful drain, then runs reviewers. Use when a service lacks or has incomplete /readyz. Skip for libraries, CLI tools, or batch jobs.

Add to TypingMind

Tổng quan

Nhà phát hànhLerianStudio
Kho mãring
Tên kỹ năngring:implementing-readyz
Sao
215
Bản fork
28
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được LerianStudio công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Ring:Implementing Readyz trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/LerianStudio/ring/tree/main/dev-team/skills/implementing-readyz
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LerianStudio/ring.git /tmp/ring
mkdir -p .claude/skills
cp -r /tmp/ring/dev-team/skills/implementing-readyz .claude/skills/lerianstudio-ring-implementing-readyz
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Ring:Implementing Readyz trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Ring:Implementing Readyz ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Ring:Implementing Readyz với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Readyz & Self-Probe Development Cycle

When to use

  • New service being created
  • Service has external dependencies (DB, cache, queue, HTTP upstreams)
  • Service lacks /readyz or has incomplete dependency checks
  • Service missing startup self-probe, SaaS TLS enforcement, or metrics

Skip when

  • Pure library package with no deployable service or HTTP server
  • Task is documentation-only, configuration-only, or non-code
  • Service has no external dependencies AND no network listeners
  • CLI tool or batch job that does not serve HTTP traffic

You orchestrate. Agents implement. NEVER use Edit/Write/Bash on source files. All code changes go through Task(subagent_type="ring:backend-go") or Task(subagent_type="ring:backend-ts") (by language). TDD mandatory for all implementation gates (RED → GREEN → REFACTOR).

Agents:

WhoResponsibility
ring:backend-goGo services
ring:backend-tsTypeScript backend/BFF
ring:bff-tsNext.js BFF
ring:codebase-explorerGate 1 analysis
ring:visualizingGate 1.5 HTML preview
9 defaults + triggered specialistsGate 9

Readiness Architecture

/readyz — runtime dependency probe for K8s readinessProbe. /health — liveness probe gated by startup self-probe.

Standards references (WebFetch by implementation agents):

ResourceURL
Ring SRE standardshttps://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/sre.md
Go bootstrap standardshttps://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/bootstrap.md
This skill (authoritative)https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/skills/implementing-readyz/SKILL.md

Canonical response contract:

json
{
  "status": "healthy",
  "checks": {
    "postgres": { "status": "up", "latency_ms": 2, "tls": true },
    "redis":    { "status": "skipped", "reason": "REDIS_ENABLED=false" },
    "upstream_fees": { "status": "degraded", "breaker_state": "half-open", "latency_ms": 12 }
  },
  "version": "1.2.3",
  "deployment_mode": "saas"
}

Status vocabulary: up / down / degraded / skipped / n/a — no others.

Aggregation rule: top-level "unhealthy" + HTTP 503 if ANY check is down or degraded.

Probe logging contract (MANDATORY):

Kubernetes hits /readyz every 5s (≈17,280 calls/day per pod). Per-iteration INFO logging drowns log pipelines.

OutcomeLog level
Success (all checks up)DEBUG
Failure (any check down/degraded)WARN

INFO/ERROR are not used by the probe handler. Steady-state observability is the job of readyz_check_status / readyz_check_duration metrics (Gate 5) — logs are diagnostic only. Access-log middleware MUST exclude /readyz, /health, /metrics from request logging — lib-observability applies this by default (defaultLogExcludedRoutes in middleware/logging.go); use middleware.WithExcludedRoutes(...) to append more paths. Services not on lib-observability must keep an explicit skipTelemetryPaths filter.

Endpoint paths:

StackReadinessLiveness
Go API/readyz/health
TypeScript API/readyz/health
Next.js/api/admin/health/readyzsame

Forbidden anti-patterns (block progression in Gate 0):

  1. Response caching in front of /readyz
  2. /ready alias (not /readyz)
  3. /health/live + /health/ready split
  4. strings.Contains(uri, "tls=true") — use url.Parse
  5. Reflection on *amqp.Connection for TLS state
  6. Inline TLS checks at each connection site — use ValidateSaaSTLS()
  7. process.exit() in Next.js instrumentation.ts on probe failure
  8. INFO log on probe success — see Probe logging contract; success is DEBUG, failure is WARN

Mandatory agent instruction (include in EVERY dispatch):

WebFetch https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/skills/implementing-readyz/SKILL.md and sre.md. Follow the canonical response contract exactly. Five-value status vocabulary. Aggregation: 503 iff any check is down or degraded. Probe logging: success at DEBUG, failure at WARN. No INFO from the probe handler. Forbidden anti-patterns 1-8: MUST NOT introduce any. TDD: RED → GREEN → REFACTOR.

Gate Overview

GateNameConditionAgent
0Stack Detection + /readyz Compliance AuditAlwaysOrchestrator
1Codebase AnalysisAlwaysring:codebase-explorer
1.5Implementation Preview (HTML report)Alwaysring:visualizing
2/readyz Endpoint ImplementationAlwaysring:backend-go / ring:backend-ts (by language)
3TLS Detection (url.Parse)Alwaysring:backend-go / ring:backend-ts (by language)
4SaaS TLS Enforcement (ValidateSaaSTLS)Alwaysring:backend-go / ring:backend-ts (by language)
5Metrics EmissionAlwaysring:backend-go / ring:backend-ts (by language)
6Circuit Breaker + Multi-Tenant Carve-OutSkip only if no breakers AND single-tenantring:backend-go / ring:backend-ts (by language)
7Startup Self-Probe + /health + Graceful DrainAlways — NEVER skippablering:backend-go / ring:backend-ts (by language)
8TestsAlwaysring:backend-go / ring:backend-ts (by language)
9Code ReviewAlways9 defaults + triggered specialists in parallel
10User ValidationAlwaysUser
11Activation GuideAlwaysOrchestrator

Gates execute sequentially. Existing /readyz code ≠ compliance. Gate 0 Phase 2 audit is mandatory.

Gate 0: Stack Detection + Audit

Orchestrator executes directly. Three phases:

Phase 1: Stack Detection

bash
grep -rn "postgresql\|pgx" internal/ go.mod
grep -rn "mongodb\|mongo" internal/ go.mod
grep -rn "redis\|valkey" internal/ go.mod
grep -rn "rabbitmq\|amqp" internal/ go.mod
grep -rn "http.Client\|upstream" internal/
grep -rn "circuitbreaker\|gobreaker" internal/
grep "DEPLOYMENT_MODE\|saas" .env* internal/

Phase 2: Compliance Audit (S1-S10) (if /readyz code detected)

  • S1: Response contract shape (all required fields present)
  • S2: Status vocabulary (only 5 valid values)
  • S3: Aggregation rule (503 on down/degraded)
  • S4: Endpoint path (exact /readyz, not /ready)
  • S5: No response caching
  • S6: TLS detection uses url.Parse, not strings.Contains
  • S7: ValidateSaaSTLS() called at bootstrap for SaaS mode
  • S8: Three readyz metrics emitted
  • S9: Startup self-probe gates /health
  • S10: Probe logging follows the contract (success = DEBUG, failure = WARN; no INFO from probe handler; /readyz, /health, /metrics excluded from access log — automatic on lib-observability, manual skipTelemetryPaths otherwise)

Phase 3: Anti-Pattern Detection Check for each of the 8 forbidden anti-patterns. Any match = COMPLIANT: false.

Severity Reference

SeverityCriteria
CRITICALDEPLOYMENT_MODE=saas without ValidateSaaSTLS; TLS reflection; response caching
HIGHWrong status vocabulary; aggregation rule wrong; metrics not emitted; self-probe missing; INFO logging on probe success
MEDIUMMissing reason on skipped/n/a; drain grace too short
LOWMissing per-dep description; inconsistent version string

Câu hỏi thường gặp

Kỹ năng AI Ring:Implementing Readyz làm được gì?

Implementing the canonical /readyz readiness-probe contract across Go, TypeScript, and Next.js via a 12-gate cycle: detects stack, audits compliance, then dispatches agents to build the dependency probe, url.Parse TLS detection, ValidateSaaSTLS enforcement, metrics, startup self-probe, and graceful drain, then runs reviewers. Use when a service lacks or has incomplete /readyz. Skip for libraries, CLI tools, or batch jobs.

Vì sao nên dùng Ring:Implementing Readyz trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Ring:Implementing Readyz là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Ring:Implementing Readyz trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/LerianStudio/ring/tree/main/dev-team/skills/implementing-readyz. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Ring:Implementing Readyz?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Ring:Implementing Readyz với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Ring:Implementing Readyz với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Ring:Implementing Readyz có miễn phí không?

Có. Kỹ năng này được LerianStudio phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇