feat(dev-cycle): reclassify gate cadence for ~40-50% speedup

Reclassify gates 1,2,4,5,6w,7w,8 (backend) and 1,2,4,5,6,7 (frontend) from subtask to task cadence. Gates 0, 3, 9 remain subtask-level. All 8 reviewers still run, all quality thresholds preserved.

Additional changes: standards pre-cache at Step 1.5 (cached_standards in state); Gate 0.5 merged into Gate 0 exit criteria via ring:dev-implementation Step 7; dev-report aggregates cycle-wide via accumulated_metrics (single cycle-end dispatch); dev-refactor clusters findings by (file, pattern_category) with findings:[] traceability array; read-after-write state verification removed; per-subtask visual reports opt-in only. State schema v1.1.0 (additive - backward compatible).

New shared patterns: standards-cache-protocol.md, gate-cadence-classification.md.

X-Lerian-Ref: 0x1
This commit is contained in:
Fred Amaral 2026-04-17 21:25:17 -03:00
parent 50f5727c25
commit f862c50a56
No known key found for this signature in database
GPG key ID: ADFE56C96F4AC56A
24 changed files with 1565 additions and 526 deletions

View file

@ -3,6 +3,7 @@ name: ring:codereview
description: |
Gate 4 of development cycle - dispatches 8 specialized reviewers (code, business-logic,
security, test, nil-safety, consequences, dead-code, performance) in parallel for comprehensive code review feedback.
Runs at TASK cadence — reviewers see cumulative diff, not per-subtask fragments.
trigger: |
- Gate 4 of development cycle
@ -30,15 +31,30 @@ related:
input_schema:
required: [] # All inputs optional for standalone usage
optional:
- name: scope
type: string
enum: [task, subtask]
default: task
description: "Review scope granularity. Default 'task' — reviewers see the cumulative diff of all subtasks of a task. 'subtask' is only for standalone/legacy usage."
- name: task_id
type: string
description: "Task identifier (when scope=task). This is the task whose cumulative diff is under review."
- name: subtask_ids
type: array
items: string
description: "All subtask identifiers covered by this task-level review."
- name: cumulative_diff_range
type: object
description: "Cumulative diff range for the task: {base_sha, head_sha}. base_sha is HEAD before the first subtask, head_sha is HEAD after the last subtask."
- name: unit_id
type: string
description: "Task or subtask identifier (auto-generated if not provided)"
description: "Task or subtask identifier (auto-generated if not provided). When scope=task, this equals task_id."
- name: base_sha
type: string
description: "Git SHA before implementation (auto-detected via git merge-base HEAD main)"
description: "Git SHA before implementation (auto-detected via git merge-base HEAD main). When scope=task, equals cumulative_diff_range.base_sha."
- name: head_sha
type: string
description: "Git SHA after implementation (auto-detected via git rev-parse HEAD)"
description: "Git SHA after implementation (auto-detected via git rev-parse HEAD). When scope=task, equals cumulative_diff_range.head_sha."
- name: implementation_summary
type: string
description: "Summary of what was implemented (auto-generated from git log if not provided)"
@ -494,6 +510,10 @@ NOTE: Input collection failures are NOT blockers.
## Step 3: Dispatch All 8 Reviewers in Parallel
> **Standards Source (Cache-First Pattern):** Reviewer prompts below instruct agents to load Ring standards. When invoked inside a dev-cycle, those standards are available via `state.cached_standards` (populated by dev-cycle Step 1.5). Each reviewer reads from cache when available and falls back to direct WebFetch (with a warning) only when invoked standalone. See `shared-patterns/standards-cache-protocol.md` for protocol details.
>
> NOTE: The reviewer agents themselves live in `*/agents/*-reviewer.md`. The cache-first pattern inside the dispatch prompts below is the source of truth for the SKILL layer. Full cache-aware loading in the agent definitions will be addressed in a separate stream.
**⛔ CRITICAL: All 8 reviewers MUST be dispatched in a SINGLE message with 8 Task calls.**
### Step 3 Mode Selection
@ -601,6 +621,21 @@ AFTER ALL SLICES COMPLETE:
The following dispatch is used when `review_state.slicing.enabled == false` (unchanged from current flow):
**⛔ MANDATORY SCOPE HEADER — inject into every reviewer prompt below.**
When `scope == "task"` (the default, set by `ring:dev-cycle` orchestrator), the orchestrator MUST inject the following block into each of the 8 reviewer prompts, immediately after the `## Code Review Request` / `## Business Logic Review Request` / etc. header:
```markdown
**REVIEW SCOPE: TASK-LEVEL**
This review covers the CUMULATIVE diff of task {task_id}, which includes changes from
{N} subtasks: {subtask_ids}. Review the full task as an integrated unit; subtask
boundaries are implementation detail, not review boundaries.
```
Substitution: `{task_id}` = `task_id` input, `{N}` = `len(subtask_ids)`, `{subtask_ids}` = comma-separated `subtask_ids`. When `scope == "subtask"` (standalone/legacy), omit the block entirely.
Additionally, when `scope == "task"`, each reviewer prompt's `**Base SHA:**` and `**Head SHA:**` MUST be populated from `cumulative_diff_range.base_sha` and `cumulative_diff_range.head_sha` respectively.
```yaml
# Task 1: Code Reviewer
Task:
@ -608,7 +643,9 @@ Task:
description: "Code review for [unit_id]"
prompt: |
## Code Review Request
[INJECT REVIEW SCOPE: TASK-LEVEL block here when scope=task]
**Unit ID:** [unit_id]
**Base SHA:** [base_sha]
**Head SHA:** [head_sha]
@ -647,9 +684,19 @@ Task:
## ⛔ Ring Standards Verification (MANDATORY)
**WebFetch the relevant standards modules and verify the changed code against them.**
**Load the relevant standards modules using the cache-first pattern and verify the changed code against them.**
For Go projects, WebFetch these modules based on changed files:
```yaml
For each required standards URL below:
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"
```
For Go projects, load these modules based on changed files:
Base URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/`
**Always load:**
@ -665,7 +712,7 @@ Task:
- `security.md` (if auth/middleware/validation code changed)
- `messaging.md` (if RabbitMQ/message queue code changed)
For TypeScript: WebFetch `typescript.md`
For TypeScript: load `typescript.md` via the same cache-first pattern
**Check the changed code against ALL applicable sections.** Use the section index from `standards-coverage-table.md`.
@ -780,7 +827,19 @@ Task:
## ⛔ Ring Security Standards Verification (MANDATORY)
**WebFetch the security standards and verify changed code against them:**
**Load the security standards using the cache-first pattern and verify changed code against them:**
```yaml
For each required standards URL below:
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"
```
Required URLs:
- `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/security.md`
**Check ALL applicable sections from standards-coverage-table.md → ring:backend-engineer-golang:**
@ -1087,9 +1146,19 @@ Task:
## ⛔ Ring Standards Verification (MANDATORY)
**WebFetch the relevant standards and verify the changed code against them.**
**Load the relevant standards using the cache-first pattern and verify the changed code against them.**
For Go projects, WebFetch these modules based on changed files:
```yaml
For each required standards URL below:
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"
```
For Go projects, load these modules based on changed files:
Base URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/`
**Always load:**
@ -1097,8 +1166,8 @@ Task:
- `core.md` (Dependency Management)
- `bootstrap.md` (Connection Management, Graceful Shutdown)
For TypeScript: WebFetch `typescript.md` (Testing, Frameworks & Libraries)
For SRE/Infra (Layer 2): WebFetch `sre.md` (Health Checks, Observability)
For TypeScript: load `typescript.md` (Testing, Frameworks & Libraries) via the same cache-first pattern
For SRE/Infra (Layer 2): load `sre.md` (Health Checks, Observability) via the same cache-first pattern
**Include a Standards Compliance section in your output** listing which standards were verified and any violations found.

View file

@ -3,6 +3,8 @@ name: ring:dev-chaos-testing
description: |
Gate 7 of development cycle - ensures chaos tests exist using Toxiproxy
to verify graceful degradation under connection loss, latency, and partitions.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 9):
write mode runs per task, execute mode runs per cycle.
trigger: |
- After integration testing complete (Gate 6)
@ -31,7 +33,7 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "TASK identifier (not a subtask id). This skill's write mode runs at TASK cadence — unit_id is always a task id. Execute mode runs per cycle."
- name: external_dependencies
type: array
items: string
@ -40,6 +42,13 @@ input_schema:
type: string
enum: [go, typescript]
description: "Programming language"
- name: implementation_files
type: array
items: string
description: "Union of changed files across all subtasks of this task."
- name: gate0_handoffs
type: array
description: "Array of per-subtask implementation handoffs (one entry per subtask). NOT a single gate0_handoff object."
optional:
- name: gate6_handoff
type: object
@ -111,9 +120,24 @@ Ensure code handles **failure conditions gracefully** by injecting faults using
---
## 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.
## Standards Reference
**MANDATORY:** Load testing-chaos.md standards via WebFetch.
**MANDATORY:** Load testing-chaos.md standards via the cache-first pattern below.
URL: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-chaos.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"
<fetch_required>
https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-chaos.md
@ -173,9 +197,11 @@ PM team task files often omit external_dependencies. If the codebase uses postgr
```text
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- unit_id: [TASK id — write mode runs at task cadence, not per subtask]
- external_dependencies: [postgres, mongodb, valkey, redis, rabbitmq, etc.] (from input OR auto-detected in Step 0)
- language: [go|typescript]
- implementation_files: [union of changed files across all subtasks of this task]
- gate0_handoffs: [array of per-subtask Gate 0 handoffs — one entry per subtask]
OPTIONAL INPUT:
- gate6_handoff: [full Gate 6 output]

View file

@ -178,6 +178,42 @@ Store result in state file under `ui_library_mode`.
---
## Step 1.5: Standards Pre-Cache (MANDATORY)
Cache all standards URLs the cycle will need, ONCE, into `state.cached_standards`.
Sub-skills read from this cache instead of calling WebFetch themselves.
**Required URLs to pre-fetch (MUST succeed all):**
1. `https://raw.githubusercontent.com/LerianStudio/ring/main/CLAUDE.md`
2. `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend.md`
3. `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-accessibility.md`
4. `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-visual.md`
5. `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-e2e.md`
6. `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-performance.md`
7. `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/devops.md`
8. `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/sre.md`
9. `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/typescript.md` (if BFF layer detected)
**Protocol:**
```text
For each URL in the required list:
WebFetch: [URL]
Write to state.cached_standards[URL] = {
"fetched_at": current_iso_timestamp,
"content": <fetched content>
}
```
**MANDATORY:** Save state to file after cache populated — Write tool → [state.state_path]
**Blocker:** If ANY URL fails to fetch, STOP cycle and report. Cache MUST be complete. Sub-skills downstream rely on `state.cached_standards` being populated; a partial cache causes WebFetch fallback warnings and defeats the purpose of pre-caching.
**Rationale:** Before this step existed, every sub-skill dispatch triggered its own WebFetch of the same standards. The 5-minute prompt cache TTL is regularly exceeded, producing 1525+ redundant network fetches per cycle. A single pre-cache at cycle start reduces that to one fetch per unique URL.
---
## Backend Handoff Loading (Optional)
If the frontend cycle follows a backend `ring:dev-cycle`, load the handoff file:
@ -387,17 +423,19 @@ No negotiation. No exceptions. No "special cases".
## The 9 Gates
| Gate | Skill | Purpose | Agent | Standards Module |
|------|-------|---------|-------|------------------|
| 0 | ring:dev-implementation | Write code following TDD | ring:frontend-engineer / ring:ui-engineer / ring:frontend-bff-engineer-typescript | frontend.md |
| 1 | ring:dev-devops | Docker/compose/Nginx setup | ring:devops-engineer | devops.md |
| 2 | ring:dev-frontend-accessibility | WCAG 2.1 AA compliance | ring:qa-analyst-frontend (test_mode: accessibility) | testing-accessibility.md |
| 3 | ring:dev-unit-testing | Unit tests 85%+ coverage | ring:qa-analyst-frontend (test_mode: unit) | frontend.md |
| 4 | ring:dev-frontend-visual | Snapshot/visual regression tests | ring:qa-analyst-frontend (test_mode: visual) | testing-visual.md |
| 5 | ring:dev-frontend-e2e | E2E tests with Playwright | ring:qa-analyst-frontend (test_mode: e2e) | testing-e2e.md |
| 6 | ring:dev-frontend-performance | Core Web Vitals + Lighthouse | ring:qa-analyst-frontend (test_mode: performance) | testing-performance.md |
| 7 | ring:codereview | Parallel code review (5 reviewers) | ring:code-reviewer, ring:business-logic-reviewer, ring:security-reviewer, ring:test-reviewer, ring:frontend-engineer (review mode) | N/A |
| 8 | ring:dev-validation | Final acceptance validation | N/A (verification) | N/A |
| Gate | Cadence | Skill | Purpose | Agent | Standards Module |
|------|---------|-------|---------|-------|------------------|
| 0 | subtask | ring:dev-implementation | Write code following TDD | ring:frontend-engineer / ring:ui-engineer / ring:frontend-bff-engineer-typescript | frontend.md |
| 1 | task | ring:dev-devops | Docker/compose/Nginx setup | ring:devops-engineer | devops.md |
| 2 | task | ring:dev-frontend-accessibility | WCAG 2.1 AA compliance | ring:qa-analyst-frontend (test_mode: accessibility) | testing-accessibility.md |
| 3 | subtask | ring:dev-unit-testing | Unit tests 85%+ coverage | ring:qa-analyst-frontend (test_mode: unit) | frontend.md |
| 4 | task | ring:dev-frontend-visual | Snapshot/visual regression tests | ring:qa-analyst-frontend (test_mode: visual) | testing-visual.md |
| 5 | task | ring:dev-frontend-e2e | E2E tests with Playwright | ring:qa-analyst-frontend (test_mode: e2e) | testing-e2e.md |
| 6 | task | ring:dev-frontend-performance | Core Web Vitals + Lighthouse | ring:qa-analyst-frontend (test_mode: performance) | testing-performance.md |
| 7 | task | ring:codereview | Parallel code review (5 reviewers, cumulative task diff) | ring:code-reviewer, ring:business-logic-reviewer, ring:security-reviewer, ring:test-reviewer, ring:frontend-engineer (review mode) | N/A |
| 8 | subtask | ring:dev-validation | Final acceptance validation | N/A (verification) | N/A |
**Cadence column:** `subtask` = runs once per subtask (execution unit). `task` = runs ONCE per task, after all subtasks complete their Gate 0/3/8.
**All gates are MANDATORY. No exceptions. No skip reasons.**
@ -474,19 +512,21 @@ Task 5: { subagent_type: "ring:frontend-engineer", prompt: "REVIEW MODE: Review
**A gate is COMPLETE only when all components finish successfully:**
| Gate | Components Required | Partial = FAIL |
|------|---------------------|----------------|
| 0.1 | TDD-RED: Failing test written + failure output captured (behavioral components only - see [Frontend TDD Policy](#gate-0-frontend-tdd-policy)) | Test exists but no failure output = FAIL. Visual-only components skip to 0.2 |
| 0.2 | TDD-GREEN: Implementation passes test (behavioral) OR implementation complete (visual) | Code exists but test fails = FAIL |
| 0 | Both 0.1 and 0.2 complete (behavioral) OR 0.2 complete (visual - snapshots deferred to Gate 4) | 0.1 done without 0.2 = FAIL |
| 1 | Dockerfile + docker-compose/nginx + .env.example | Missing any = FAIL |
| 2 | 0 WCAG AA violations + keyboard navigation tested + screen reader tested | Any violation = FAIL |
| 3 | Unit test coverage >= 85% + all AC tested | 84% = FAIL |
| 4 | All state snapshots pass + responsive breakpoints covered | Missing snapshots = FAIL |
| 5 | All user flows tested + cross-browser (Chromium, Firefox, WebKit) + 3x stable pass | Flaky = FAIL |
| 6 | LCP < 2.5s + CLS < 0.1 + INP < 200ms + Lighthouse >= 90 | Any threshold missed = FAIL |
| 7 | All 5 reviewers PASS | 4/5 reviewers = FAIL |
| 8 | Explicit "APPROVED" from user | "Looks good" = not approved |
| Gate | Cadence | Components Required | Partial = FAIL |
|------|---------|---------------------|----------------|
| 0.1 | subtask | TDD-RED: Failing test written + failure output captured (behavioral components only - see [Frontend TDD Policy](#gate-0-frontend-tdd-policy)) | Test exists but no failure output = FAIL. Visual-only components skip to 0.2 |
| 0.2 | subtask | TDD-GREEN: Implementation passes test (behavioral) OR implementation complete (visual) | Code exists but test fails = FAIL |
| 0 | subtask | Both 0.1 and 0.2 complete (behavioral) OR 0.2 complete (visual - snapshots deferred to Gate 4) | 0.1 done without 0.2 = FAIL |
| 1 | task | Dockerfile + docker-compose/nginx + .env.example (produced once per task) | Missing any = FAIL |
| 2 | task | 0 WCAG AA violations + keyboard navigation tested + screen reader tested (on cumulative task diff) | Any violation = FAIL |
| 3 | subtask | Unit test coverage >= 85% + all AC tested (per subtask) | 84% = FAIL |
| 4 | task | All state snapshots pass + responsive breakpoints covered (cumulative task components) | Missing snapshots = FAIL |
| 5 | task | All user flows tested + cross-browser (Chromium, Firefox, WebKit) + 3x stable pass (task-level flows) | Flaky = FAIL |
| 6 | task | LCP < 2.5s + CLS < 0.1 + INP < 200ms + Lighthouse >= 90 (task-level measurement) | Any threshold missed = FAIL |
| 7 | task | All 5 reviewers PASS on cumulative task diff | 4/5 reviewers = FAIL |
| 8 | subtask | Explicit "APPROVED" from user (per subtask) | "Looks good" = not approved |
**Cadence column:** `subtask` = runs per subtask. `task` = runs ONCE per task on the UNION of all subtasks' changed files. All quality thresholds (WCAG AA, 85% coverage, CWV, Lighthouse ≥ 90) remain unchanged — only the execution frequency changes.
**CRITICAL for Gate 7:** Running 4 of 5 reviewers is not a partial pass - it's a FAIL. Re-run all 5 reviewers.
@ -527,14 +567,55 @@ Task 5: { subagent_type: "ring:frontend-engineer", prompt: "REVIEW MODE: Review
## Execution Order
**Core Principle:** Each execution unit passes through all 9 gates. All gates execute and complete per unit.
**Core Principle:** Each task passes through all 9 gates. Gates 0, 3, 8 execute per subtask (execution unit). Gates 1, 2, 4, 5, 6, 7 execute ONCE per task after all subtasks complete their subtask-level gates.
**Per-Unit Flow:** Unit -> Gate 0->1->2->3->4->5->6->7->8 -> Unit Checkpoint -> Task Checkpoint -> Next Unit
**Per-Task Flow:**
```
Task → (for each subtask: Gate 0 → Gate 3 → Gate 8)
→ Gate 1 → Gate 2 → Gate 4 → Gate 5 → Gate 6 → Gate 7
→ Task-level visual report → Task Checkpoint → Next Task
```
| Scenario | Execution Unit | Gates Per Unit |
|----------|----------------|----------------|
| Task without subtasks | Task itself | 9 gates |
| Task with subtasks | Each subtask | 9 gates per subtask |
| Scenario | Execution Unit | Subtask-level Gates | Task-level Gates |
|----------|----------------|---------------------|------------------|
| Task without subtasks | Task itself (treated as single subtask) | 0, 3, 8 | 1, 2, 4, 5, 6, 7 |
| Task with subtasks | Each subtask | 0, 3, 8 (per subtask) | 1, 2, 4, 5, 6, 7 (once per task) |
## Execution Loop Structure (the "Prancy Bentley" cadence model)
```yaml
for each task in state.tasks:
# ===== SUBTASK-LEVEL GATES =====
for each subtask in task.subtasks:
Execute Gate 0 (Implementation)
Execute Gate 3 (Unit Testing)
Execute Gate 8 (Validation)
[per-subtask visual report — OPT-IN only via state.visual_report_granularity]
end for
# ===== TASK-LEVEL GATES =====
# Input aggregation: implementation_files = UNION across subtasks
Execute Gate 1 (DevOps)
Execute Gate 2 (Accessibility)
Execute Gate 4 (Visual)
Execute Gate 5 (E2E)
Execute Gate 6 (Performance)
Execute Gate 7 (Review — 5 parallel reviewers on cumulative task diff)
Generate task-level visual report
Accumulate metrics into state.tasks[i].accumulated_metrics
[task checkpoint]
end for
# Cycle-level (minimal for frontend)
Final Commit
```
**Key properties:**
- Subtask-level gates (0, 3, 8) establish working, tested, validated code per subtask.
- Task-level gates (1, 2, 4, 5, 6, 7) run on the UNION of all subtasks' changed files — one pass per task, not N passes.
- Reviewers at Gate 7 see the cumulative task diff, so cross-subtask interaction bugs become MORE visible, not less.
- Per-subtask visual reports are opt-in; the default task-level aggregate report covers all subtasks' diffs.
## Commit Timing
@ -586,7 +667,7 @@ State is persisted to `docs/ring:dev-cycle-frontend/current-cycle.json`:
```json
{
"version": "1.0.0",
"version": "1.1.0",
"cycle_id": "uuid",
"started_at": "ISO timestamp",
"updated_at": "ISO timestamp",
@ -594,6 +675,10 @@ State is persisted to `docs/ring:dev-cycle-frontend/current-cycle.json`:
"state_path": "docs/ring:dev-cycle-frontend/current-cycle.json",
"cycle_type": "frontend",
"ui_library_mode": "sindarian-ui | fallback-only",
"_comment_cached_standards": "Populated by Step 1.5 (Standards Pre-Cache). Dictionary of URL → {fetched_at, content}. Sub-skills MUST read from here instead of calling WebFetch. See plan Section 3.1.",
"cached_standards": {},
"_comment_visual_report_granularity": "Default 'task' (generate visual report once per task). Opt-in 'subtask' to generate per-subtask reports. See plan Section 3.3.",
"visual_report_granularity": "task",
"backend_handoff": {
"loaded": true,
"source": "docs/ring:dev-cycle/handoff-frontend.json",
@ -625,9 +710,16 @@ State is persisted to `docs/ring:dev-cycle-frontend/current-cycle.json`:
{
"id": "ST-001-01",
"file": "subtasks/T-001/ST-001-01.md",
"status": "pending|completed"
"status": "pending|completed",
"_comment_subtask_gate_progress": "Per-subtask tracking of subtask-level gates (0, 3, 8). Added in plan Section 3 / Edit 4.2.4. Task-level gates (1,2,4,5,6,7) live on state.tasks[i].gate_progress instead.",
"gate_progress": {
"implementation": {"status": "pending|completed"},
"unit_testing": {"status": "pending|completed", "coverage_actual": 0.0},
"validation": {"status": "pending|completed", "result": "approved|rejected"}
}
}
],
"_comment_task_gate_progress": "Task-level gates (1, 2, 4, 5, 6, 7) run ONCE per task on the UNION of all subtasks' changed files. Subtask-level gates (0, 3, 8) live on state.tasks[i].subtasks[j].gate_progress.",
"gate_progress": {
"implementation": {
"status": "pending|in_progress|completed",
@ -798,7 +890,15 @@ State is persisted to `docs/ring:dev-cycle-frontend/current-cycle.json`:
"result": "approved|rejected",
"timestamp": "ISO timestamp"
}
}
},
"_comment_accumulated_metrics": "Task-level rollup of gate metrics. Populated after the task-level gates complete. Cycle-end dev-report reads accumulated_metrics from all tasks. See plan Section 3 / Edit 4.2.4.",
"accumulated_metrics": {
"gate_durations_ms": {},
"review_iterations": 0,
"testing_iterations": 0,
"issues_by_severity": {"CRITICAL": 0, "HIGH": 0, "MEDIUM": 0, "LOW": 0}
},
"feedback_loop_completed": false
}
],
"metrics": {
@ -848,11 +948,6 @@ state.updated_at = "[ISO timestamp]"
Write tool:
file_path: "docs/ring:dev-cycle-frontend/current-cycle.json"
content: [full JSON state]
# Step 3: Verify persistence (MANDATORY - use Read tool)
Read tool:
file_path: "docs/ring:dev-cycle-frontend/current-cycle.json"
# Confirm current_gate and gate_progress match expected values
```
### State Persistence Checkpoints
@ -900,22 +995,12 @@ Read tool:
**Unit Checkpoint (after subtask completes Gate 8):**
**VISUAL CHANGE REPORT (MANDATORY - before checkpoint question):**
- MANDATORY: Invoke `Skill("ring:visualize")` to generate a code-diff HTML report for this execution unit
- Read `default/skills/visualize/templates/code-diff.html` to absorb the patterns before generating
- Content sourced from state JSON `agent_outputs` for the current unit:
* **TDD Output:** `tdd_red` (failing test) + `tdd_green` (implementation)
* **Files Changed:** Per-file before/after diff panels using `git diff` data from the implementation (do not read source files directly — use diff output provided by the implementation agent)
* **Frontend-Specific Metrics:** WCAG violations resolved (Gate 2), visual snapshot pass rate (Gate 4), LCP/CLS/INP values (Gate 6), Lighthouse score (Gate 6)
* **Review Verdicts:** Summary of all 5 reviewer verdicts from Gate 7
- Save to: `docs/ring:dev-cycle-frontend/reports/unit-{unit_id}-report.html`
- Open in browser:
```text
macOS: open docs/ring:dev-cycle-frontend/reports/unit-{unit_id}-report.html
Linux: xdg-open docs/ring:dev-cycle-frontend/reports/unit-{unit_id}-report.html
```
- Tell the user the file path
- See [shared-patterns/anti-rationalization-visual-report.md](../shared-patterns/anti-rationalization-visual-report.md) for anti-rationalization table
**VISUAL CHANGE REPORT (subtask-level — OPT-IN ONLY):**
- Default: SKIP per-subtask visual report. Task-level aggregate report is generated at the Task Checkpoint below.
- Opt-in: If `state.visual_report_granularity == "subtask"`, generate per-subtask report
as previously documented. Default value is "task".
- Rationale: Task-level aggregate covers all subtasks' diffs; per-subtask reports are
rarely consumed and cost one visualize dispatch each.
```text
Subtask {id} complete. All 9 gates passed.
@ -1025,24 +1110,68 @@ Check: Does docs/PROJECT_RULES.md exist?
---
## Step 2-10: Gate Execution (Per Unit)
## Step 2-10: Gate Execution
### Step 2: Gate 0 - Implementation
**See [Execution Loop Structure](#execution-loop-structure-the-prancy-bentley-cadence-model) below for the full subtask/task cadence model.** Step headings below indicate cadence explicitly.
### Step 2: Gate 0 - Implementation (Per Execution Unit)
**Cadence:** Runs once per subtask (execution unit = subtask, or task-itself if no subtasks).
**REQUIRED SUB-SKILL:** `Skill("ring:dev-implementation")`
Dispatch appropriate frontend agent based on task type. Agent follows TDD (RED then GREEN) with frontend.md standards.
### Step 3: Gate 1 - DevOps
### Step 3: Gate 1 - DevOps (Per Task — after all subtasks complete 0/3/8)
⛔ CADENCE: This gate runs ONCE per task, NOT per subtask.
Input `implementation_files` is the UNION of all subtasks' changed files.
**REQUIRED SUB-SKILL:** `Skill("ring:dev-devops")`
**Prepare Input (task-level aggregation):**
```yaml
devops_input = {
unit_id: state.tasks[current_task_index].id, # TASK id
implementation_files: [
...flatten(state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation.files_changed
))
],
gate0_handoffs: state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation
),
# preserve other fields (language, service_type, ui_library_mode, etc.)
}
```
Dispatch `ring:devops-engineer` for Dockerfile, docker-compose, Nginx configuration, and .env.example.
### Step 4: Gate 2 - Accessibility
### Step 4: Gate 2 - Accessibility (Per Task)
⛔ CADENCE: This gate runs ONCE per task, NOT per subtask.
Input `implementation_files` is the UNION of all subtasks' changed files.
**REQUIRED SUB-SKILL:** `Skill("ring:dev-frontend-accessibility")`
**Prepare Input (task-level aggregation):**
```yaml
accessibility_input = {
unit_id: state.tasks[current_task_index].id, # TASK id
implementation_files: [
...flatten(state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation.files_changed
))
],
gate0_handoffs: state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation
),
# preserve other fields
}
```
Dispatch `ring:qa-analyst-frontend` with `test_mode="accessibility"`. MUST verify:
- 0 WCAG 2.1 AA violations (axe-core scan)
- Keyboard navigation works for all interactive elements
@ -1050,7 +1179,9 @@ Dispatch `ring:qa-analyst-frontend` with `test_mode="accessibility"`. MUST verif
- Focus management is proper
- Color contrast ratios meet AA thresholds
### Step 5: Gate 3 - Unit Testing
### Step 5: Gate 3 - Unit Testing (Per Execution Unit)
**Cadence:** Runs once per subtask (unchanged). Coverage threshold (85%) applies per subtask.
**REQUIRED SUB-SKILL:** `Skill("ring:dev-unit-testing")`
@ -1060,30 +1191,90 @@ Dispatch `ring:qa-analyst-frontend` with `test_mode="unit"`. MUST verify:
- Component rendering, state management, and event handlers tested
- Edge cases covered (empty states, error states, loading states)
### Step 6: Gate 4 - Visual Testing
### Step 6: Gate 4 - Visual Testing (Per Task)
⛔ CADENCE: This gate runs ONCE per task, NOT per subtask.
Input `implementation_files` is the UNION of all subtasks' changed files.
**REQUIRED SUB-SKILL:** `Skill("ring:dev-frontend-visual")`
**Prepare Input (task-level aggregation):**
```yaml
visual_input = {
unit_id: state.tasks[current_task_index].id, # TASK id
implementation_files: [
...flatten(state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation.files_changed
))
],
gate0_handoffs: state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation
),
# preserve other fields
}
```
Dispatch `ring:qa-analyst-frontend` with `test_mode="visual"`. MUST verify:
- All component states have snapshots (default, hover, active, disabled, error, loading)
- Responsive breakpoints covered (mobile, tablet, desktop)
- Design system compliance verified
- Visual regression baseline established
### Step 7: Gate 5 - E2E Testing
### Step 7: Gate 5 - E2E Testing (Per Task)
⛔ CADENCE: This gate runs ONCE per task, NOT per subtask.
Input `implementation_files` is the UNION of all subtasks' changed files.
**REQUIRED SUB-SKILL:** `Skill("ring:dev-frontend-e2e")`
**Prepare Input (task-level aggregation):**
```yaml
e2e_input = {
unit_id: state.tasks[current_task_index].id, # TASK id
implementation_files: [
...flatten(state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation.files_changed
))
],
gate0_handoffs: state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation
),
# preserve other fields
}
```
Dispatch `ring:qa-analyst-frontend` with `test_mode="e2e"`. MUST verify:
- All user flows tested end-to-end
- Cross-browser: Chromium, Firefox, WebKit
- 3x consecutive stable pass (no flakiness)
- Page object pattern used for maintainability
### Step 8: Gate 6 - Performance Testing
### Step 8: Gate 6 - Performance Testing (Per Task)
⛔ CADENCE: This gate runs ONCE per task, NOT per subtask.
Input `implementation_files` is the UNION of all subtasks' changed files.
**REQUIRED SUB-SKILL:** `Skill("ring:dev-frontend-performance")`
**Prepare Input (task-level aggregation):**
```yaml
performance_input = {
unit_id: state.tasks[current_task_index].id, # TASK id
implementation_files: [
...flatten(state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation.files_changed
))
],
gate0_handoffs: state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation
),
# preserve other fields
}
```
Dispatch `ring:qa-analyst-frontend` with `test_mode="performance"`. MUST verify:
- LCP (Largest Contentful Paint) < 2.5s
- CLS (Cumulative Layout Shift) < 0.1
@ -1091,13 +1282,36 @@ Dispatch `ring:qa-analyst-frontend` with `test_mode="performance"`. MUST verify:
- Lighthouse Performance score >= 90
- Bundle size within budget (if defined in PROJECT_RULES.md)
### Step 9: Gate 7 - Code Review
### Step 9: Gate 7 - Code Review (Per Task)
⛔ CADENCE: This gate runs ONCE per task, NOT per subtask.
Input `implementation_files` is the UNION of all subtasks' changed files.
**Reviewers see CUMULATIVE diff of all subtasks; cross-subtask bugs more visible.**
**REQUIRED SUB-SKILL:** `Skill("ring:codereview")`
**Prepare Input (task-level aggregation):**
```yaml
review_input = {
unit_id: state.tasks[current_task_index].id, # TASK id
implementation_files: [
...flatten(state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation.files_changed
))
],
gate0_handoffs: state.tasks[current_task_index].subtasks.map(st =>
st.gate_progress.implementation
),
# preserve other fields
}
```
Dispatch all 5 reviewers in parallel (see Gate 7: Code Review Adaptation above).
### Step 10: Gate 8 - Validation
### Step 10: Gate 8 - Validation (Per Execution Unit)
**Cadence:** Runs once per subtask (unchanged). User approval is per subtask.
**REQUIRED SUB-SKILL:** `Skill("ring:dev-validation")`

File diff suppressed because it is too large Load diff

View file

@ -7,15 +7,9 @@ description: |
functioning in the running application?" Applies to ANY task type: features, refactors,
fixes, infrastructure, API endpoints, middleware, business logic, integrations.
trigger: |
- After Gate 0 (implementation) completes, before advancing to Gate 1
- After any refactoring task claims completion
- When code is generated/scaffolded and needs integration verification
trigger: "Deprecated — use ring:dev-implementation instead (includes these checks as Gate 0 exit criteria)."
skip_when: |
- Not inside a development cycle (ring:dev-cycle or ring:dev-refactor)
- Task is documentation-only, configuration-only, or non-code
- No implementation was produced in Gate 0 (nothing to verify)
skip_when: "always — this skill is preserved but not dispatched in normal cycles."
NOT_skip_when: |
- "Code compiles" → Compilation ≠ integration. Dead code compiles.
@ -88,6 +82,23 @@ output_schema:
description: "Number of fix instructions returned to Gate 0 (0 when PASS)"
---
---
> ⚠️ **DEPRECATION NOTICE (since "prancy Bentley" speedup)**
>
> This skill's functionality has been **inlined into `ring:dev-implementation` as Step 7:
> Delivery Verification Exit Check**. New cycles should NOT dispatch this skill as a
> separate gate — the checks run as exit criteria of Gate 0.
>
> This file is preserved for:
> 1. Historical reference of the full check list
> 2. External consumers that may still reference the skill by name
> 3. Potential future use as a standalone audit tool outside the cycle
>
> If you are modifying dev-cycle or dev-implementation, do NOT add dispatches to this skill.
---
# Delivery Verification Gate
## The Problem This Solves

View file

@ -3,7 +3,8 @@ name: ring:dev-devops
description: |
Gate 1 of the development cycle. Creates/updates Docker configuration,
docker-compose setup, and environment variables for local development
and deployment readiness.
and deployment readiness. Runs at TASK cadence (after all subtasks
complete Gate 0 + Gate 3 + Gate 9).
trigger: |
- Gate 1 of development cycle
@ -32,7 +33,7 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "TASK identifier (not a subtask id). This skill runs at TASK cadence — unit_id is always a task id."
- name: language
type: string
enum: [go, typescript, python]
@ -44,11 +45,11 @@ input_schema:
- name: implementation_files
type: array
items: string
description: "List of files from Gate 0 implementation"
description: "Union of changed files across all subtasks of this task."
- name: gate0_handoffs
type: array
description: "Array of per-subtask implementation handoffs (one entry per subtask). NOT a single gate0_handoff object."
optional:
- name: gate0_handoff
type: object
description: "Full handoff from Gate 0"
- name: new_dependencies
type: array
items: string
@ -152,13 +153,13 @@ This skill configures the development and deployment infrastructure:
```text
REQUIRED INPUT (from ring:dev-cycle orchestrator):
- unit_id: [task/subtask being containerized]
- unit_id: [TASK id — runs at task cadence, not per subtask]
- language: [go|typescript|python]
- service_type: [api|worker|batch|cli]
- implementation_files: [files from Gate 0]
- implementation_files: [union of changed files across all subtasks of this task]
- gate0_handoffs: [array of per-subtask Gate 0 handoffs — one entry per subtask]
OPTIONAL INPUT:
- gate0_handoff: [full Gate 0 output]
- new_dependencies: [deps added in Gate 0]
- new_env_vars: [env vars needed]
- new_services: [postgres, redis, etc.]
@ -235,8 +236,22 @@ Task:
- docker-compose.yml: [EXISTS/MISSING]
- .env.example: [EXISTS/MISSING]
## 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.
## Standards Reference
WebFetch: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/devops.md
URL: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/devops.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"
You MUST implement all sections from devops.md.
@ -341,7 +356,17 @@ Task:
[list ❌ sections and FAIL verifications]
## Standards Reference
WebFetch: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/devops.md
URL: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/devops.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"
Fix all issues and re-run verification commands.
Return updated Standards Coverage Table with all ✅.

View file

@ -3,6 +3,7 @@ name: ring:dev-frontend-accessibility
description: |
Gate 2 of frontend development cycle - ensures all components pass axe-core
automated accessibility scans with zero WCAG 2.1 AA violations.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 8).
trigger: |
- After DevOps setup complete (Gate 1)
@ -31,11 +32,15 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "Task identifier (always a TASK id; runs at task cadence)"
- name: implementation_files
type: array
items: string
description: "Files from Gate 0 implementation"
description: "Union of changed files across all subtasks of this task"
- name: gate0_handoffs
type: array
items: object
description: "Array of per-subtask implementation handoffs (one per subtask). NOT a single gate0_handoff object."
- name: language
type: string
enum: [typescript]
@ -112,7 +117,21 @@ Ensure all frontend components meet **WCAG 2.1 AA** accessibility standards thro
## Standards Reference
**MANDATORY:** Load testing-accessibility.md standards via WebFetch.
> **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.
**MANDATORY:** Load testing-accessibility.md standards using the cache-first pattern below.
Required URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-accessibility.md`
```yaml
For the required standards URL above:
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"
```
<fetch_required>
https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-accessibility.md
@ -124,8 +143,9 @@ https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards
```text
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- unit_id: [TASK id — this gate runs at task cadence, aggregating all subtasks]
- implementation_files: [union of changed files across all subtasks of the task]
- gate0_handoffs: [array of per-subtask implementation handoffs, one per subtask]
- language: [typescript only]
OPTIONAL INPUT:
@ -134,6 +154,9 @@ OPTIONAL INPUT:
if any REQUIRED input is missing:
→ STOP and report: "Missing required input: [field]"
if gate0_handoffs is not an array:
→ STOP and report: "gate0_handoffs must be an array of per-subtask handoffs"
if language != "typescript":
→ STOP and report: "Frontend accessibility testing only supported for TypeScript/React"
```
@ -149,10 +172,13 @@ Task tool:
**Standards:** Load testing-accessibility.md
**Input:**
- Unit ID: {unit_id}
- Implementation Files: {implementation_files}
- Task ID: {unit_id} (task-level — aggregates all subtasks)
- Implementation Files (union across all subtasks): {implementation_files}
- Per-Subtask Gate 0 Handoffs: {gate0_handoffs}
- Language: typescript
**Scope:** Validate accessibility for the task (all subtasks aggregated), not a single subtask.
**Requirements:**
1. Run axe-core scans on all components (all states: default, loading, error, empty, disabled)
2. Test keyboard navigation (Tab, Enter, Escape, Arrow keys)

View file

@ -3,6 +3,7 @@ name: ring:dev-frontend-e2e
description: |
Gate 5 of frontend development cycle - ensures all user flows from
product-designer have passing E2E tests with Playwright across browsers.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 8).
trigger: |
- After visual testing complete (Gate 4)
@ -31,11 +32,15 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "Task identifier (always a TASK id; runs at task cadence)"
- name: implementation_files
type: array
items: string
description: "Files from Gate 0 implementation"
description: "Union of changed files across all subtasks of this task"
- name: gate0_handoffs
type: array
items: object
description: "Array of per-subtask implementation handoffs (one per subtask). NOT a single gate0_handoff object."
optional:
- name: user_flows_path
type: string
@ -119,7 +124,21 @@ Ensure all user flows from `ring:product-designer` have passing **Playwright E2E
## Standards Reference
**MANDATORY:** Load testing-e2e.md standards via WebFetch.
> **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.
**MANDATORY:** Load testing-e2e.md standards using the cache-first pattern below.
Required URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-e2e.md`
```yaml
For the required standards URL above:
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"
```
<fetch_required>
https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-e2e.md
@ -131,8 +150,9 @@ https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards
```text
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- unit_id: [TASK id — this gate runs at task cadence, aggregating all subtasks]
- implementation_files: [union of changed files across all subtasks of the task]
- gate0_handoffs: [array of per-subtask implementation handoffs, one per subtask]
OPTIONAL INPUT:
- user_flows_path: [path to user-flows.md]
@ -142,6 +162,9 @@ OPTIONAL INPUT:
if any REQUIRED input is missing:
→ STOP and report: "Missing required input: [field]"
if gate0_handoffs is not an array:
→ STOP and report: "gate0_handoffs must be an array of per-subtask handoffs"
if user_flows_path provided:
→ Load user flows as E2E test scenarios
→ All flows MUST be covered
@ -162,11 +185,14 @@ Task tool:
**Standards:** Load testing-e2e.md
**Input:**
- Unit ID: {unit_id}
- Implementation Files: {implementation_files}
- Task ID: {unit_id} (task-level — aggregates all subtasks)
- Implementation Files (union across all subtasks): {implementation_files}
- Per-Subtask Gate 0 Handoffs: {gate0_handoffs}
- User Flows: {user_flows_path or "N/A"}
- Backend Handoff: {backend_handoff or "N/A"}
**Scope:** Validate E2E flows for the task (all subtasks aggregated), not a single subtask.
**Requirements:**
1. Create Playwright tests for all user flows
2. Test happy path + error paths (API 500, timeout, validation)

View file

@ -3,6 +3,7 @@ name: ring:dev-frontend-performance
description: |
Gate 6 of frontend development cycle - ensures Core Web Vitals compliance,
Lighthouse performance score > 90, and bundle size within budget.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 8).
trigger: |
- After E2E testing complete (Gate 5)
@ -31,11 +32,15 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "Task identifier (always a TASK id; runs at task cadence)"
- name: implementation_files
type: array
items: string
description: "Files from Gate 0 implementation"
description: "Union of changed files across all subtasks of this task"
- name: gate0_handoffs
type: array
items: object
description: "Array of per-subtask implementation handoffs (one per subtask). NOT a single gate0_handoff object."
optional:
- name: performance_baseline
type: object
@ -119,7 +124,21 @@ Ensure all frontend pages meet **Core Web Vitals** thresholds, achieve **Lightho
## Standards Reference
**MANDATORY:** Load testing-performance.md standards via WebFetch.
> **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.
**MANDATORY:** Load testing-performance.md standards using the cache-first pattern below.
Required URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-performance.md`
```yaml
For the required standards URL above:
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"
```
<fetch_required>
https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-performance.md
@ -131,8 +150,9 @@ https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards
```text
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- unit_id: [TASK id — this gate runs at task cadence, aggregating all subtasks]
- implementation_files: [union of changed files across all subtasks of the task]
- gate0_handoffs: [array of per-subtask implementation handoffs, one per subtask]
OPTIONAL INPUT:
- performance_baseline: [previous metrics for comparison]
@ -140,6 +160,9 @@ OPTIONAL INPUT:
if any REQUIRED input is missing:
→ STOP and report: "Missing required input: [field]"
if gate0_handoffs is not an array:
→ STOP and report: "gate0_handoffs must be an array of per-subtask handoffs"
```
## Step 2: Dispatch Frontend QA Analyst Agent (Performance Mode)
@ -153,10 +176,13 @@ Task tool:
**Standards:** Load testing-performance.md
**Input:**
- Unit ID: {unit_id}
- Implementation Files: {implementation_files}
- Task ID: {unit_id} (task-level — aggregates all subtasks)
- Implementation Files (union across all subtasks): {implementation_files}
- Per-Subtask Gate 0 Handoffs: {gate0_handoffs}
- Baseline: {performance_baseline or "N/A"}
**Scope:** Validate performance for the task (all subtasks aggregated), not a single subtask.
**Requirements:**
1. Measure Core Web Vitals (LCP, CLS, INP) on all affected pages
2. Run Lighthouse audit (Performance score > 90)

View file

@ -3,6 +3,7 @@ name: ring:dev-frontend-visual
description: |
Gate 4 of frontend development cycle - ensures all components have snapshot
tests covering all states, viewports, and edge cases.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 8).
trigger: |
- After unit testing complete (Gate 3)
@ -31,11 +32,15 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "Task identifier (always a TASK id; runs at task cadence)"
- name: implementation_files
type: array
items: string
description: "Files from Gate 0 implementation"
description: "Union of changed files across all subtasks of this task"
- name: gate0_handoffs
type: array
items: object
description: "Array of per-subtask implementation handoffs (one per subtask). NOT a single gate0_handoff object."
optional:
- name: ux_criteria_path
type: string
@ -114,7 +119,21 @@ Ensure all frontend components have **snapshot tests** covering all states, resp
## Standards Reference
**MANDATORY:** Load testing-visual.md standards via WebFetch.
> **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.
**MANDATORY:** Load testing-visual.md standards using the cache-first pattern below.
Required URL: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-visual.md`
```yaml
For the required standards URL above:
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"
```
<fetch_required>
https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/frontend/testing-visual.md
@ -126,8 +145,9 @@ https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards
```text
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- unit_id: [TASK id — this gate runs at task cadence, aggregating all subtasks]
- implementation_files: [union of changed files across all subtasks of the task]
- gate0_handoffs: [array of per-subtask implementation handoffs, one per subtask]
OPTIONAL INPUT:
- ux_criteria_path: [path to ux-criteria.md]
@ -135,6 +155,9 @@ OPTIONAL INPUT:
if any REQUIRED input is missing:
→ STOP and report: "Missing required input: [field]"
if gate0_handoffs is not an array:
→ STOP and report: "gate0_handoffs must be an array of per-subtask handoffs"
```
## Step 2: Dispatch Frontend QA Analyst Agent (Visual Mode)
@ -148,10 +171,13 @@ Task tool:
**Standards:** Load testing-visual.md
**Input:**
- Unit ID: {unit_id}
- Implementation Files: {implementation_files}
- Task ID: {unit_id} (task-level — aggregates all subtasks)
- Implementation Files (union across all subtasks): {implementation_files}
- Per-Subtask Gate 0 Handoffs: {gate0_handoffs}
- UX Criteria: {ux_criteria_path or "N/A"}
**Scope:** Validate visual/snapshot coverage for the task (all subtasks aggregated), not a single subtask.
**Requirements:**
1. Create snapshot tests for all components
2. Cover all states (Default, Empty, Loading, Error, Success, Disabled)

View file

@ -3,6 +3,7 @@ name: ring:dev-fuzz-testing
description: |
Gate 4 of development cycle - ensures fuzz tests exist with proper seed corpus
to discover edge cases, crashes, and unexpected input handling.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 9).
trigger: |
- After unit testing complete (Gate 3)
@ -31,15 +32,18 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "TASK identifier (not a subtask id). This skill runs at TASK cadence — unit_id is always a task id."
- name: implementation_files
type: array
items: string
description: "Files from Gate 0 implementation"
description: "Union of changed files across all subtasks of this task."
- name: language
type: string
enum: [go]
description: "Programming language (Go only for native fuzz)"
- name: gate0_handoffs
type: array
description: "Array of per-subtask implementation handoffs (one entry per subtask). NOT a single gate0_handoff object."
optional:
- name: gate3_handoff
type: object
@ -110,9 +114,24 @@ Ensure critical parsing and input handling code has **fuzz tests** to discover c
---
## 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.
## Standards Reference
**MANDATORY:** Load testing-fuzz.md standards via WebFetch.
**MANDATORY:** Load testing-fuzz.md standards via the cache-first pattern below.
URL: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-fuzz.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"
<fetch_required>
https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-fuzz.md
@ -124,9 +143,10 @@ https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards
```text
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- unit_id: [TASK id — runs at task cadence, not per subtask]
- implementation_files: [union of changed files across all subtasks of this task]
- language: [go only for native fuzz]
- gate0_handoffs: [array of per-subtask Gate 0 handoffs — one entry per subtask]
OPTIONAL INPUT:
- gate3_handoff: [full Gate 3 output]

View file

@ -4,6 +4,7 @@ description: |
Gate 0 of the development cycle. Executes code implementation using the appropriate
specialized agent based on task content and project language. Handles TDD workflow
with RED-GREEN phases. Follows project standards defined in docs/PROJECT_RULES.md.
Includes delivery verification exit criteria (merged from deprecated ring:dev-delivery-verification).
trigger: |
- Gate 0 of development cycle
@ -215,12 +216,26 @@ Task:
## 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`
**Go minimum for tests:** WebFetch `quality.md` → Testing section for test conventions.
**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.
WebFetch `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/multi-tenant.md` for patterns.
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,
@ -323,15 +338,28 @@ Task:
## 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: WebFetch the MODULAR standards files below, NOT the monolithic golang.md.**
**⛔ 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 WebFetch |
| 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` |
@ -340,12 +368,12 @@ Task:
| 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 v4 resolvers for ALL resources.
WebFetch: `https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/multi-tenant.md`
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)
@ -448,7 +476,7 @@ Task:
<cannot_skip>
- 90%+ instrumentation coverage required
- WebFetch standards file before implementation
- 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>
@ -465,12 +493,12 @@ Task:
### Language-Specific Patterns (MANDATORY)
**⛔ HARD GATE: Agent MUST WebFetch modular standards files BEFORE writing any code.**
**⛔ 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 WebFetch |
| 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` |
@ -480,15 +508,15 @@ Task:
| Requirement | Enforcement |
|-------------|-------------|
| WebFetch modular standards files | MANDATORY before implementation |
| 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 WebFetch standards and check Anti-Patterns table. Violations = REJECTED.**
**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
@ -528,7 +556,7 @@ Task:
### Standards Coverage Table (MANDATORY)
**Standards Modules Loaded:** [list modules WebFetched]
**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 |
@ -628,6 +656,54 @@ if pass_output contains "PASS" and all standards ✅ and Standards Coverage Tabl
→ Proceed to Step 8
```
## Step 7: Delivery Verification Exit Check (MANDATORY — absorbed from former Gate 0.5)
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 (absorbed from deprecated ring:dev-delivery-verification skill)
#### 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)
```yaml
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
Full detailed check list preserved in `/Users/fredamaral/repos/lerianstudio/ring/dev-team/skills/dev-delivery-verification/SKILL.md` (deprecated but retained for reference).
---
## Step 8: Prepare Output
```text
@ -667,6 +743,13 @@ Generate skill output:
- 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
```
---

View file

@ -3,6 +3,8 @@ name: ring:dev-integration-testing
description: |
Gate 6 of development cycle - ensures integration tests pass for all
external dependency interactions using real containers via testcontainers.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 9):
write mode runs per task, execute mode runs per cycle.
trigger: |
- After property-based testing complete (Gate 5)
@ -31,7 +33,7 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "TASK identifier (not a subtask id). This skill's write mode runs at TASK cadence — unit_id is always a task id. Execute mode runs per cycle."
- name: integration_scenarios
type: array
items: string
@ -44,14 +46,17 @@ input_schema:
type: string
enum: [go, typescript]
description: "Programming language"
- name: implementation_files
type: array
items: string
description: "Union of changed files across all subtasks of this task."
- name: gate0_handoffs
type: array
description: "Array of per-subtask implementation handoffs (one entry per subtask). NOT a single gate0_handoff object."
optional:
- name: gate3_handoff
type: object
description: "Full handoff from Gate 3 (unit testing)"
- name: implementation_files
type: array
items: string
description: "Files from Gate 0 implementation"
output_schema:
format: markdown
@ -176,15 +181,16 @@ PM team task files often omit external_dependencies. If the codebase uses postgr
```text
REQUIRED INPUT (from ring:dev-cycle orchestrator):
<verify_before_proceed>
- unit_id exists
- unit_id exists (TASK id — write mode runs at task cadence, not per subtask)
- language is valid (go|typescript)
- implementation_files: [union of changed files across all subtasks of this task]
- gate0_handoffs: [array of per-subtask Gate 0 handoffs — one entry per subtask]
</verify_before_proceed>
OPTIONAL INPUT (determines if Gate 6 runs or skips):
- integration_scenarios: [list of scenarios] - if provided and non-empty, Gate 6 runs
- external_dependencies: [list of deps] (from input OR auto-detected in Step 0) - if non-empty, Gate 6 runs
- gate3_handoff: [full Gate 3 output]
- implementation_files: [files from Gate 0]
EXECUTION LOGIC:
1. if any REQUIRED input is missing:
@ -270,8 +276,22 @@ Task:
## External Dependencies
[list external_dependencies with container requirements]
## 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.
## Standards Reference
WebFetch: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-integration.md
URL: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-integration.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"
Focus on: All sections, especially INT-5 (Build Tags), INT-6 (Testcontainers), INT-7 (No t.Parallel())

View file

@ -3,6 +3,7 @@ name: ring:dev-property-testing
description: |
Gate 5 of development cycle - ensures property-based tests exist
to verify domain invariants hold for all randomly generated inputs.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 9).
trigger: |
- After fuzz testing complete (Gate 4)
@ -31,15 +32,18 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier"
description: "TASK identifier (not a subtask id). This skill runs at TASK cadence — unit_id is always a task id."
- name: implementation_files
type: array
items: string
description: "Files from Gate 0 implementation"
description: "Union of changed files across all subtasks of this task."
- name: language
type: string
enum: [go]
description: "Programming language"
- name: gate0_handoffs
type: array
description: "Array of per-subtask implementation handoffs (one entry per subtask). NOT a single gate0_handoff object."
optional:
- name: domain_invariants
type: array
@ -114,9 +118,24 @@ Ensure domain logic has **property-based tests** to verify invariants hold for a
---
## 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.
## Standards Reference
**MANDATORY:** Load testing-property.md standards via WebFetch.
**MANDATORY:** Load testing-property.md standards via the cache-first pattern below.
URL: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-property.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"
<fetch_required>
https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-property.md
@ -128,9 +147,10 @@ https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards
```text
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- unit_id: [TASK id — runs at task cadence, not per subtask]
- implementation_files: [union of changed files across all subtasks of this task]
- language: [go]
- gate0_handoffs: [array of per-subtask Gate 0 handoffs — one entry per subtask]
OPTIONAL INPUT:
- domain_invariants: [list of invariants to verify]

View file

@ -986,40 +986,66 @@ Total finding count MUST match total issues from Step 4.5
---
## Step 6: Map Findings to Tasks (1:1)
## Step 6: Map Findings to Tasks (Clustered by file + pattern)
**TodoWrite:** Mark "Map findings 1:1 to REFACTOR-XXX tasks" as `in_progress`
**HARD GATE: One FINDING-XXX = One REFACTOR-XXX task. No grouping.**
## Clustering Rule (replaces former 1:1 mapping)
Each finding becomes its own task. This prevents findings from being lost inside grouped tasks.
Findings are clustered into REFACTOR tasks by the tuple `(file_path, pattern_category)`.
**1:1 Mapping Rule:**
- FINDING-001 -> REFACTOR-001
- FINDING-002 -> REFACTOR-002
- FINDING-NNN -> REFACTOR-NNN
### Clustering Algorithm
**Ordering:** Sort tasks by severity (Critical first), then by dependency order.
1. Group all findings by their `file` field (from agent report).
2. Within each file group, sub-group by `pattern_category`:
- `pattern_category` is derived from the finding's "Category" field
- (e.g., "component-architecture", "ui-library", "styling", "accessibility", "testing", "performance", etc.)
3. Each `(file, pattern_category)` tuple becomes ONE REFACTOR-XXX task.
4. If a file has findings in 3 different pattern categories → 3 REFACTOR tasks for that file.
5. If a pattern category spans multiple files → one task per (file, pattern) pair (no cross-file clustering).
### Traceability Preservation (MANDATORY)
Every REFACTOR task MUST include a `findings:` array listing all FINDING-XXX IDs it covers:
~~~markdown
## REFACTOR-005: Accessibility Pattern in src/components/UserForm.tsx
**Cluster Key:** (src/components/UserForm.tsx, accessibility)
**Findings Covered:** [FINDING-012, FINDING-015, FINDING-018]
**Severity:** HIGH (max of covered findings' severities)
**Effort:** {sum of covered findings' effort estimates}
### Findings Breakdown
| Finding | Line | Description | Status |
|---------|------|-------------|--------|
| FINDING-012 | UserForm.tsx:45 | missing aria-label on input | pending |
| FINDING-015 | UserForm.tsx:78 | missing aria-label on input | pending |
| FINDING-018 | UserForm.tsx:102 | missing aria-label on input | pending |
~~~
During dev-cycle-frontend execution, each finding's status is tracked per-line inside
the REFACTOR task. A REFACTOR task completes only when all covered findings are resolved.
### Mapping Verification (updated)
**Mapping Verification:**
```
Before proceeding to Step 7, verify:
- Total FINDING-XXX in findings.md: X
- Total REFACTOR-XXX in tasks.md: X (MUST MATCH exactly)
- Orphan findings (not mapped): 0 (MUST BE ZERO)
- Grouped tasks (multiple findings): 0 (MUST BE ZERO)
```
- Total REFACTOR-XXX in tasks.md: Y (Y ≤ X — clustering reduces count)
- Every FINDING-XXX appears in exactly ONE REFACTOR task's `findings:` array
- NO FINDING-XXX is missing from all REFACTOR tasks
- NO FINDING-XXX appears in multiple REFACTOR tasks
**If counts don't match, STOP. Every finding MUST have its own task.**
If any finding is orphan or duplicated → STOP. Fix clustering.
### Anti-Rationalization Table for Step 6
| Rationalization | Why It's WRONG | Required Action |
|-----------------|----------------|-----------------|
| "These findings are in the same file, I'll group them" | Grouping hides findings. One fix may be done, others forgotten. | **One finding = One task. No exceptions.** |
| "Grouping reduces task count and is easier to manage" | Fewer tasks = less visibility. Each finding needs independent tracking. | **Create one REFACTOR-XXX per FINDING-XXX** |
| "These are related and should be fixed together" | Related is not same task. ring:dev-cycle-frontend can execute them sequentially. | **Separate tasks, use Dependencies field to link** |
| "Too many tasks will overwhelm the developer" | Missing fixes overwhelms production. Completeness > convenience. | **Create all tasks. Priority handles ordering.** |
|---|---|---|
| "Just keep 1:1 mapping, it's simpler" | 1:1 mapping multiplies cycle cost ~5x for typical refactors. Clustering preserves traceability. | **Apply (file, pattern) clustering** |
| "Cluster across files to reduce tasks more" | Cross-file clustering hides file-specific blast radius. Only cluster within a file. | **Cluster only within file** |
| "Skip the findings: array, it's redundant" | Without traceability array, findings get lost inside tasks. | **ALWAYS populate findings: array** |
| "One finding can be in multiple tasks" | Duplicates cause double-fix attempts. One finding → one task. | **Each FINDING in exactly one REFACTOR** |
**TodoWrite:** Mark "Map findings 1:1 to REFACTOR-XXX tasks" as `completed`
@ -1038,16 +1064,17 @@ Before proceeding to Step 7, verify:
**Total Tasks:** {count}
**UI Library Mode:** {ui_library_mode}
## Mandatory 1:1 Mapping Verification
## Mandatory Clustering Traceability Verification
**Every FINDING-XXX has exactly one REFACTOR-XXX. No grouping.**
**Findings are clustered by (file, pattern_category). Every FINDING-XXX appears in exactly one REFACTOR-XXX via its `findings:` array.**
| Metric | Count |
|--------|-------|
| Total FINDING-XXX in findings.md | {X} |
| Total REFACTOR-XXX in tasks.md | {X} |
| **Counts match exactly?** | YES (REQUIRED) |
| Grouped tasks (multiple findings) | 0 (REQUIRED) |
| Total REFACTOR-XXX in tasks.md | {Y} (Y ≤ X — clustering reduces count) |
| **Every finding appears in exactly one task?** | YES (REQUIRED) |
| Orphan findings (in zero tasks) | 0 (REQUIRED) |
| Duplicate findings (in 2+ tasks) | 0 (REQUIRED) |
**Priority affects execution order, not whether to include:**
- Critical/High tasks: Execute first
@ -1056,19 +1083,26 @@ Before proceeding to Step 7, verify:
---
## REFACTOR-001: {Finding Pattern Name}
## REFACTOR-001: {Finding Pattern Name} in {file_path}
**Finding:** FINDING-001
**Severity:** Critical | High | Medium | Low (all ARE MANDATORY)
**Cluster Key:** ({file_path}, {pattern_category})
**Findings Covered:** [FINDING-XXX, FINDING-YYY, ...]
**Severity:** Critical | High | Medium | Low (max of covered findings' severities; all ARE MANDATORY)
**Category:** {component-architecture | ui-library | styling | accessibility | testing | performance | devops}
**Agent:** {agent-name}
**Effort:** {hours}h
**Effort:** {hours}h (sum of covered findings' effort estimates)
**Dependencies:** {other REFACTOR-XXX tasks or none}
### Findings Breakdown
| Finding | Line | Description | Status |
|---------|------|-------------|--------|
| FINDING-XXX | {file}:{line} | {short description} | pending |
| FINDING-YYY | {file}:{line} | {short description} | pending |
### Current Code
```{lang}
// file: {path}:{lines}
{actual code from FINDING-001}
{representative code from covered findings}
```
### Ring Standard Reference
@ -1083,6 +1117,7 @@ Before proceeding to Step 7, verify:
### Acceptance Criteria
- [ ] Code follows {standard}.md -> {section} pattern
- [ ] No {anti-pattern} usage remains
- [ ] All covered findings resolved (status: done for each row in Findings Breakdown)
- [ ] Tests pass after refactoring
```
@ -1231,6 +1266,10 @@ Skill tool:
skill: "ring:dev-cycle-frontend"
```
Note: Each REFACTOR task covering N findings is treated as ONE execution unit with N
internal acceptance criteria. dev-cycle-frontend does not need to know about clustering — it
consumes the task as-if it were any other task.
**CRITICAL: Pass tasks file path in context:**
After invoking the skill, provide:

View file

@ -847,40 +847,66 @@ If counts don't match → STOP. Go back to Step 4.1. Map missing issues.
---
## Step 6: Map Findings to Tasks (1:1)
## Step 6: Map Findings to Tasks (Clustered by file + pattern)
**TodoWrite:** Mark "Map findings 1:1 to REFACTOR-XXX tasks" as `in_progress`
**⛔ HARD GATE: One FINDING-XXX = One REFACTOR-XXX task. No grouping.**
## Clustering Rule (replaces former 1:1 mapping)
Each finding becomes its own task. This prevents findings from being lost inside grouped tasks.
Findings are clustered into REFACTOR tasks by the tuple `(file_path, pattern_category)`.
**1:1 Mapping Rule:**
- FINDING-001 → REFACTOR-001
- FINDING-002 → REFACTOR-002
- FINDING-NNN → REFACTOR-NNN
### Clustering Algorithm
**Ordering:** Sort tasks by severity (Critical first), then by dependency order.
1. Group all findings by their `file` field (from agent report).
2. Within each file group, sub-group by `pattern_category`:
- `pattern_category` is derived from the finding's "Category" field
- (e.g., "error-handling", "logging", "multi-tenant", "file-size", etc.)
3. Each `(file, pattern_category)` tuple becomes ONE REFACTOR-XXX task.
4. If a file has findings in 3 different pattern categories → 3 REFACTOR tasks for that file.
5. If a pattern category spans multiple files → one task per (file, pattern) pair (no cross-file clustering).
### Traceability Preservation (MANDATORY)
Every REFACTOR task MUST include a `findings:` array listing all FINDING-XXX IDs it covers:
~~~markdown
## REFACTOR-005: Error Wrapping Pattern in internal/handler/user.go
**Cluster Key:** (internal/handler/user.go, error-handling)
**Findings Covered:** [FINDING-012, FINDING-015, FINDING-018]
**Severity:** HIGH (max of covered findings' severities)
**Effort:** {sum of covered findings' effort estimates}
### Findings Breakdown
| Finding | Line | Description | Status |
|---------|------|-------------|--------|
| FINDING-012 | user.go:45 | `return err` without wrap | pending |
| FINDING-015 | user.go:78 | `return err` without wrap | pending |
| FINDING-018 | user.go:102 | `return err` without wrap | pending |
~~~
During dev-cycle execution, each finding's status is tracked per-line inside the
REFACTOR task. A REFACTOR task completes only when all covered findings are resolved.
### Mapping Verification (updated)
**Mapping Verification:**
```
Before proceeding to Step 7, verify:
- Total FINDING-XXX in findings.md: X
- Total REFACTOR-XXX in tasks.md: X (MUST MATCH exactly)
- Orphan findings (not mapped): 0 (MUST BE ZERO)
- Grouped tasks (multiple findings): 0 (MUST BE ZERO)
```
- Total REFACTOR-XXX in tasks.md: Y (Y ≤ X — clustering reduces count)
- Every FINDING-XXX appears in exactly ONE REFACTOR task's `findings:` array
- NO FINDING-XXX is missing from all REFACTOR tasks
- NO FINDING-XXX appears in multiple REFACTOR tasks
**If counts don't match → STOP. Every finding MUST have its own task.**
If any finding is orphan or duplicated → STOP. Fix clustering.
### Anti-Rationalization Table for Step 6
| Rationalization | Why It's WRONG | Required Action |
|-----------------|----------------|-----------------|
| "These findings are in the same file, I'll group them" | Grouping hides findings. One fix may be done, others forgotten. | **One finding = One task. No exceptions.** |
| "Grouping reduces task count and is easier to manage" | Fewer tasks = less visibility. Each finding needs independent tracking. | **Create one REFACTOR-XXX per FINDING-XXX** |
| "These are related and should be fixed together" | Related ≠ same task. Dev-cycle can execute them sequentially. | **Separate tasks, use Dependencies field to link** |
| "Too many tasks will overwhelm the developer" | Missing fixes overwhelms production. Completeness > convenience. | **Create all tasks. Priority handles ordering.** |
|---|---|---|
| "Just keep 1:1 mapping, it's simpler" | 1:1 mapping multiplies cycle cost ~5x for typical refactors. Clustering preserves traceability. | **Apply (file, pattern) clustering** |
| "Cluster across files to reduce tasks more" | Cross-file clustering hides file-specific blast radius. Only cluster within a file. | **Cluster only within file** |
| "Skip the findings: array, it's redundant" | Without traceability array, findings get lost inside tasks. | **ALWAYS populate findings: array** |
| "One finding can be in multiple tasks" | Duplicates cause double-fix attempts. One finding → one task. | **Each FINDING in exactly one REFACTOR** |
**TodoWrite:** Mark "Map findings 1:1 to REFACTOR-XXX tasks" as `completed`
@ -898,16 +924,17 @@ Before proceeding to Step 7, verify:
**Source:** findings.md
**Total Tasks:** {count}
## ⛔ Mandatory 1:1 Mapping Verification
## ⛔ Mandatory Clustering Traceability Verification
**Every FINDING-XXX has exactly one REFACTOR-XXX. No grouping.**
**Findings are clustered by (file, pattern_category). Every FINDING-XXX appears in exactly one REFACTOR-XXX via its `findings:` array.**
| Metric | Count |
|--------|-------|
| Total FINDING-XXX in findings.md | {X} |
| Total REFACTOR-XXX in tasks.md | {X} |
| **Counts match exactly?** | ✅ YES (REQUIRED) |
| Grouped tasks (multiple findings) | 0 (REQUIRED) |
| Total REFACTOR-XXX in tasks.md | {Y} (Y ≤ X — clustering reduces count) |
| **Every finding appears in exactly one task?** | ✅ YES (REQUIRED) |
| Orphan findings (in zero tasks) | 0 (REQUIRED) |
| Duplicate findings (in 2+ tasks) | 0 (REQUIRED) |
**Priority affects execution order, not whether to include:**
- Critical/High tasks: Execute first
@ -916,19 +943,26 @@ Before proceeding to Step 7, verify:
---
## REFACTOR-001: {Finding Pattern Name}
## REFACTOR-001: {Finding Pattern Name} in {file_path}
**Finding:** FINDING-001
**Severity:** Critical | High | Medium | Low (all ARE MANDATORY)
**Cluster Key:** ({file_path}, {pattern_category})
**Findings Covered:** [FINDING-XXX, FINDING-YYY, ...]
**Severity:** Critical | High | Medium | Low (max of covered findings' severities; all ARE MANDATORY)
**Category:** {lib-commons | architecture | testing | devops}
**Agent:** {agent-name}
**Effort:** {hours}h
**Effort:** {hours}h (sum of covered findings' effort estimates)
**Dependencies:** {other REFACTOR-XXX tasks or none}
### Findings Breakdown
| Finding | Line | Description | Status |
|---------|------|-------------|--------|
| FINDING-XXX | {file}:{line} | {short description} | pending |
| FINDING-YYY | {file}:{line} | {short description} | pending |
### Current Code
```{lang}
// file: {path}:{lines}
{actual code from FINDING-001}
{representative code from covered findings}
```
### Ring Standard Reference
@ -943,6 +977,7 @@ Before proceeding to Step 7, verify:
### Acceptance Criteria
- [ ] Code follows {standard}.md → {section} pattern
- [ ] No {anti-pattern} usage remains
- [ ] All covered findings resolved (status: done for each row in Findings Breakdown)
- [ ] Tests pass after refactoring
```
@ -1052,6 +1087,10 @@ Skill tool:
skill: "ring:dev-cycle"
```
Note: Each REFACTOR task covering N findings is treated as ONE execution unit with N
internal acceptance criteria. dev-cycle does not need to know about clustering — it
consumes the task as-if it were any other task.
**⛔ CRITICAL: Pass tasks file path in context:**
After invoking the skill, provide:

View file

@ -6,14 +6,12 @@ description: |
on failures, and generates improvement reports to docs/feedbacks/cycle-{date}/.
trigger: |
- After task completion (any gate outcome)
- After validation approval or rejection
- At end of development cycle
- When assertiveness drops below threshold
- Invoked EXACTLY ONCE per dev-cycle at Step 12.1 of ring:dev-cycle (and equivalent in ring:dev-cycle-frontend).
- Per-task invocations at Step 11.2 were REMOVED in R4 — per-task metrics are accumulated into state.tasks[*].accumulated_metrics and analyzed in aggregate here.
skip_when: |
- Task still in progress -> wait for completion
- Feedback already recorded for this task -> proceed
- Cycle still in progress -> wait for Step 12.1 (cycle completion)
- Feedback already recorded for this cycle -> proceed
NOT_skip_when: |
- "Exploratory/spike work" → all work produces learnings. Track metrics for spikes too.
@ -32,6 +30,8 @@ related:
See [CLAUDE.md](https://raw.githubusercontent.com/LerianStudio/ring/main/CLAUDE.md) for canonical validation and gate requirements. This skill collects metrics and generates improvement reports.
**Invocation Contract (since R4 of "prancy Bentley" speedup):** This skill is invoked EXACTLY ONCE per dev-cycle, at Step 12.1 of ring:dev-cycle (and equivalent in ring:dev-cycle-frontend). Per-task invocations at Step 11.2 have been REMOVED. This skill expects aggregated data spanning ALL tasks in the cycle.
Continuous improvement system that tracks development cycle effectiveness through assertiveness scores, identifies recurring failure patterns, and generates actionable improvement suggestions.
**Core principle:** What gets measured gets improved. Track every gate transition to identify systemic issues.
@ -271,7 +271,34 @@ Base score of 100 points, with deductions for inefficiencies:
**Anti-exemption check:**
If you're thinking "perfect outcome, skip metrics" → STOP. This is Red Flag at line 75 ("Perfect outcome, skip the metrics").
**After task completion, gather from `agent_outputs` in state file:**
**After cycle completion, gather from `agent_outputs` in state file:**
### New (R4): `state.tasks[*].accumulated_metrics`
Per-task metrics accumulated during the cycle at each task's approval checkpoint (Step 11.2 of ring:dev-cycle). Use these to construct the cycle-wide analysis instead of single-task analysis.
**Semantic shift:** Analyze ALL tasks' aggregated metrics + the full `agent_outputs` for the cycle, not a single task's data.
Per-task fields under `state.tasks[i].accumulated_metrics`:
- `gate_durations_ms`: {gate_name: duration_ms for each completed gate}
- `review_iterations`: review iterations for this task
- `testing_iterations`: sum across all testing gates (unit, fuzz, property, integration, chaos)
- `issues_by_severity`: {CRITICAL, HIGH, MEDIUM, LOW counts from Gate 8 output}
**Aggregation pattern for cycle-wide analysis:**
```yaml
# Sum across all tasks in the cycle:
cycle_gate_durations_ms = sum(t.accumulated_metrics.gate_durations_ms for t in state.tasks)
cycle_review_iterations = sum(t.accumulated_metrics.review_iterations for t in state.tasks)
cycle_testing_iterations = sum(t.accumulated_metrics.testing_iterations for t in state.tasks)
cycle_issues_by_severity = {
"CRITICAL": sum(t.accumulated_metrics.issues_by_severity.CRITICAL for t in state.tasks),
"HIGH": sum(t.accumulated_metrics.issues_by_severity.HIGH for t in state.tasks),
"MEDIUM": sum(t.accumulated_metrics.issues_by_severity.MEDIUM for t in state.tasks),
"LOW": sum(t.accumulated_metrics.issues_by_severity.LOW for t in state.tasks),
}
```
### Structured Data Fields (NEW)
@ -339,7 +366,7 @@ extra_iterations = (
## Step 3: Analyze Prompt Quality (Agents Only)
After calculating assertiveness, analyze prompt quality for all **agents** that executed in the task.
After calculating assertiveness, analyze prompt quality for all **agents** that executed in the cycle (across all tasks).
### 3.1 Load Agent Outputs
@ -364,20 +391,33 @@ Analyze prompt quality for all agents executed in this task.
Task tool:
subagent_type: "ring:prompt-quality-reviewer"
prompt: |
Analyze prompt quality for agents in task [task_id].
CONTEXT: You are analyzing a COMPLETE dev-cycle across N tasks (not a single task).
The data you receive spans all tasks in the cycle. Since R4 of the
"prancy Bentley" speedup, ring:dev-report is invoked exactly ONCE per cycle
(Step 12.1 of ring:dev-cycle), so aggregate-level analysis is the expected mode.
Agent outputs from state:
[agent_outputs]
Cycle: [cycle_id]
Tasks analyzed: [task_ids] (N total)
For each agent:
Aggregated cycle metrics (sum across all tasks' accumulated_metrics):
gate_durations_ms: [cycle_gate_durations_ms]
review_iterations: [cycle_review_iterations]
testing_iterations: [cycle_testing_iterations]
issues_by_severity: [cycle_issues_by_severity]
Full agent_outputs history for the cycle (all tasks, all gates):
[agent_outputs] # from state.tasks[*].agent_outputs (not a single task subset)
For each agent that executed in the cycle:
1. Load definition from dev-team/agents/ or default/agents/
2. Extract rules: MUST, MUST not, ask_when, output_schema
3. Compare output vs rules
4. Calculate score
5. Identify gaps with evidence
6. Generate improvements
3. Compare each output invocation vs rules (across all tasks)
4. Calculate aggregate score (average across invocations)
5. Identify recurring gaps with evidence (quote task IDs + gate)
6. Generate cycle-level improvements prioritized by occurrence count
Return structured analysis per agent.
Return structured analysis per agent, with per-task evidence rolled into
cycle-wide patterns.
```
### 3.3 Write Feedback Files

View file

@ -3,6 +3,7 @@ name: ring:dev-sre
description: |
Gate 2 of the development cycle. VALIDATES that observability was correctly implemented
by developers. Does not implement observability code - only validates it.
Runs at TASK cadence (after all subtasks complete Gate 0 + Gate 3 + Gate 9).
trigger: |
- Gate 2 of development cycle
@ -32,7 +33,7 @@ input_schema:
required:
- name: unit_id
type: string
description: "Task or subtask identifier being validated"
description: "TASK identifier (not a subtask id). This skill runs at TASK cadence — unit_id is always a task id."
- name: language
type: string
enum: [go, typescript, python]
@ -47,15 +48,15 @@ input_schema:
- name: implementation_files
type: array
items: string
description: "List of files created/modified in Gate 0"
description: "Union of changed files across all subtasks of this task."
- name: gate0_handoffs
type: array
description: "Array of per-subtask implementation handoffs (one entry per subtask). NOT a single gate0_handoff object."
optional:
- name: external_dependencies
type: array
items: string
description: "External services called (HTTP, gRPC, queues)"
- name: gate0_handoff
type: object
description: "Summary from Gate 0 implementation"
- name: gate1_handoff
type: object
description: "Summary from Gate 1 DevOps setup"
@ -142,15 +143,15 @@ This skill VALIDATES that observability was correctly implemented by developers:
```text
REQUIRED INPUT (from ring:dev-cycle orchestrator):
- unit_id: [task/subtask being validated]
- unit_id: [TASK id — runs at task cadence, not per subtask]
- language: [go|typescript|python]
- service_type: [api|worker|batch|cli|library]
- implementation_agent: [agent that did Gate 0]
- implementation_files: [list of files from Gate 0]
- implementation_files: [union of changed files across all subtasks of this task]
- gate0_handoffs: [array of per-subtask Gate 0 handoffs — one entry per subtask]
OPTIONAL INPUT:
- external_dependencies: [HTTP clients, gRPC clients, queues]
- gate0_handoff: [summary from Gate 0]
- gate1_handoff: [summary from Gate 1]
if any REQUIRED input is missing:
@ -191,8 +192,22 @@ Task:
- **Files to Validate:** [implementation_files]
- **External Dependencies:** [external_dependencies or "None"]
## 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.
## Standards Reference
WebFetch: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/sre.md
URL: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/sre.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"
## Your Role
- VALIDATE that observability is implemented correctly

View file

@ -204,10 +204,24 @@ Task:
## Implementation Files to Test
[list implementation_files]
## 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.
## Standards Reference
For Go: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang.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"
Focus on: Testing Patterns section
## Requirements

View file

@ -2,7 +2,8 @@
name: ring:dev-validation
description: |
Development cycle validation gate (Gate 5) - validates all acceptance criteria are met
and requires explicit user approval before completion.
and requires explicit user approval before completion. Runs at subtask (execution unit)
cadence. Task-level approval happens in dev-cycle Step 11.2.
trigger: |
- After review gate passes (Gate 4)

View file

@ -0,0 +1,46 @@
---
name: shared-pattern:gate-cadence-classification
description: Classification of dev-cycle gates by execution cadence (subtask/task/cycle).
---
# Gate Cadence Classification
## Three Cadences
### Subtask Cadence
Runs for every subtask (or task itself if no subtasks). Input scoped to a single unit.
- Backend: Gate 0 (Implementation + delivery verify), Gate 3 (Unit Testing), Gate 9 (Validation)
- Frontend: Gate 0 (Implementation), Gate 3 (Unit Testing), Gate 8 (Validation)
### Task Cadence
Runs once per task, after all subtasks complete their subtask-level gates. Input is
UNION of all subtasks' changes.
- Backend: Gate 1 (DevOps), Gate 2 (SRE), Gate 4 (Fuzz), Gate 5 (Property), Gate 6 write
(Integration), Gate 7 write (Chaos), Gate 8 (Review — 8 reviewers)
- Frontend: Gate 1 (DevOps), Gate 2 (Accessibility), Gate 4 (Visual), Gate 5 (E2E),
Gate 6 (Performance), Gate 7 (Review — 5 reviewers)
### Cycle Cadence
Runs once per cycle at cycle end.
- Backend: Gate 6 execute (Integration), Gate 7 execute (Chaos), Multi-Tenant Verify,
dev-report, Final Commit
- Frontend: Final Commit (minimal cycle-level processing)
## Why Cadence Matters
Running task-cadence gates at subtask cadence causes redundant work: Dockerfile
validation, observability coverage checks, fuzz seed generation, and cumulative diff
review all have outputs that stabilize at the task boundary, not the subtask boundary.
The task-level cumulative diff is strictly more informative for review than N
per-subtask fragments because interaction bugs between subtasks are visible only in
the cumulative view.
## Implementation Requirement
Sub-skills that run at task cadence MUST accept aggregated input:
- `implementation_files`: array (union across all subtasks of the task)
- `gate0_handoffs`: array (one entry per subtask)
Sub-skills that run at subtask cadence MUST continue to accept scoped input:
- `implementation_files`: array (this subtask's changes only)
- `gate0_handoff`: object (this subtask's handoff)

View file

@ -96,6 +96,23 @@ This principle is NON-NEGOTIABLE for all dev-team skills.
✅ Task(subagent_type="ring:finops-automation", ...)
```
## Gate Cadence Classification
Gates in dev-cycle operate at three cadences:
| Cadence | Gates (backend) | Gates (frontend) |
|---------|-----------------|------------------|
| **Subtask** | 0 (impl + delivery verify), 3 (unit test), 9 (validation) | 0, 3, 8 |
| **Task** | 1 (devops), 2 (sre), 4 (fuzz), 5 (property), 6 write, 7 write, 8 (review) | 1, 2, 4, 5, 6, 7 |
| **Cycle** | 6 execute, 7 execute, multi-tenant verify, dev-report, final commit | (minimal cycle-level) |
Sub-skills that run at task cadence receive input aggregated across all subtasks of
the task (e.g., `implementation_files` = UNION of all subtasks' changed files).
Sub-skills that run at subtask cadence receive input scoped to that single subtask.
See `shared-patterns/gate-cadence-classification.md` for the full classification and rationale.
## Gate/Step → Agent Mapping
### ring:dev-cycle Gates

View file

@ -0,0 +1,57 @@
---
name: shared-pattern:standards-cache-protocol
description: Protocol for reading cached standards from cycle state instead of WebFetching directly.
---
# Standards Cache Protocol
## Purpose
Eliminate redundant WebFetch calls during a dev-cycle by pre-caching all required
standards at cycle start (dev-cycle Step 1.5) and having sub-skills read from state.
## Protocol
### For Sub-Skills
When a sub-skill needs a standards document:
```yaml
STEP 1: Check state cache
IF state.cached_standards[URL] exists:
content = state.cached_standards[URL].content
log: "Using cached standard: {URL} (fetched {fetched_at})"
proceed with content
ELSE:
goto STEP 2
STEP 2: Fallback WebFetch (only if cache miss)
log WARNING: "Standard {URL} not in cache; fetching inline"
content = WebFetch(URL)
proceed with content
```
### For Orchestrators (dev-cycle, dev-cycle-frontend)
At Step 1.5 of the cycle:
1. Detect project stack (Go / TypeScript / Frontend)
2. Build URL list (see dev-cycle Step 1.5 for current list)
3. WebFetch each URL once
4. Write to `state.cached_standards[URL] = {fetched_at, content}`
5. MANDATORY: Save state to file
6. Blocker if ANY URL fails to fetch
## Why
Before: ~1525 WebFetch calls per cycle (one per sub-skill dispatch). Prompt cache TTL
of 5 min is regularly exceeded, causing repeated network fetches of identical content.
After: Exactly ONE WebFetch per unique URL per cycle. Same content, ~5x fewer network
operations.
## Safety
If the cache mechanism fails or is bypassed:
- Sub-skills fall back to direct WebFetch (with warning log).
- No correctness regression; only performance regression.
- Operators can monitor "Standard {URL} not in cache" warnings to detect misconfigurations.

View file

@ -4,6 +4,18 @@ This file defines the MANDATORY output format for agents comparing codebases aga
---
## Standards Source (new, since "prancy Bentley" speedup)
Agents and sub-skills MUST read standards from `state.cached_standards` (populated by
dev-cycle Step 1.5) instead of calling WebFetch directly. This eliminates ~1525
redundant network fetches per cycle.
If a sub-skill is invoked outside of a dev-cycle context (standalone testing, manual
dispatch), it MAY fall back to direct WebFetch — but it MUST log a warning and
operators should expect slower execution.
---
## ⛔ CRITICAL: All Sections Are Required
**This is NON-NEGOTIABLE. Every section listed in the Agent → Standards Section Index below MUST be checked.**