ring/dev-team/commands/dev-cycle.md
Fred Amaral 7fd01e41f7
feat(workflows): expand code review and dev-cycle with advanced testing
The parallel code review process expands from 3 to 5 reviewers to
enhance code quality. This introduces `ring:test-reviewer` and
`ring:nil-safety-reviewer` to provide deeper analysis of test coverage
and null safety patterns, improving overall reliability.

The `dev-cycle` workflow is upgraded from a 6-gate to a 10-gate process,
incorporating a sophisticated suite of automated testing gates:
- Unit Testing (Gate 3)
- Fuzz Testing (Gate 4)
- Property-based Testing (Gate 5)
- Integration Testing (Gate 6)
- Chaos Testing (Gate 7)

This change establishes a much higher standard for testing and ensures
features are more resilient and production-ready.

Finally, new agents and commands are added to the PMO and Product plugins
to support delivery tracking, design validation, and reporting, further
extending the system's capabilities across the development lifecycle.
All documentation is updated to reflect these enhancements.
2026-02-09 21:05:41 -03:00

8.2 KiB

name description argument-hint
ring:dev-cycle Execute the development cycle for tasks in a markdown file [tasks-file] [options] [prompt]

Execute the development cycle for tasks in a markdown file or from a direct prompt.

Usage

/ring:dev-cycle [tasks-file] [options] [prompt]
/ring:dev-cycle [prompt]

Arguments

Argument Required Description
tasks-file No* Path to markdown file with tasks (e.g., docs/tasks/sprint-001.md)
prompt No* Direct instruction for what to implement (no quotes needed)

*Either tasks-file, prompt, or --resume is required.

Options

Option Description Example
--task ID Execute only specific task --task PROJ-123
--skip-gates Skip specific gates --skip-gates devops,review
--dry-run Validate tasks without executing --dry-run
--resume Resume interrupted cycle --resume

Prompt Modes

Direct Prompt (No Tasks File)

When a prompt is provided without a tasks file, ring:dev-cycle enters prompt-only mode:

  1. Analyzes the prompt to understand what needs to be done
  2. Generates tasks internally (similar to pre-dev but streamlined)
  3. Executes through 6 gates as normal
# Direct prompt - no tasks file needed
/ring:dev-cycle Implement multi-tenant support for the API

# Another example
/ring:dev-cycle Add pagination to all list endpoints with cursor-based navigation

With Tasks File + Additional Context

# Tasks file with additional context
/ring:dev-cycle docs/tasks/sprint-001.md Focus on error handling

# Tasks file with specific guidance
/ring:dev-cycle docs/tasks/sprint-001.md Prioritize security validations

When to use direct prompt:

  • Quick implementations without full pre-dev planning
  • Exploratory work where full planning is overkill
  • When you know exactly what you want and want to skip task file creation

When to use tasks file:

  • Complex multi-task features (use /pre-dev-* first)
  • Refactoring work (use /ring:dev-refactor first)
  • When you need documented task breakdown for tracking

Prompt Behavior (with tasks file)

CANNOT override CRITICAL gates. Provides custom context to agents.

Persistence:

  • Stored: custom_prompt field in docs/ring:dev-cycle/current-cycle.json
  • Resume: Survives interrupts; editable by modifying state file before --resume
  • Reports: Included in execution reports under "Custom Context Used"

Propagation: Prepended to all agent prompts in a dedicated **CUSTOM CONTEXT (from user):** section. Applies to all gates and all agent types.

Constraints:

  • Length: Recommended 50-75 words (~300-400 chars); hard limit 500 chars (truncated with warning). For longer context, summarize or link to external docs.
  • Sanitization: Whitespace trimmed, control chars stripped (except newlines), unicode normalized. Does not prevent semantic prompt-injection attempts.

Gate Protection:

CRITICAL: Gates 3, 4, 5 enforce mandatory requirements:

  • MUST enforce 85% coverage (Gate 3 Testing)
  • MUST dispatch all 5 reviewers (Gate 4 Review)
  • MUST require user approval (Gate 5 Validation)

Conflict Detection:

  • Method: Targeted pattern matching (e.g., skip (gate|test|review), bypass (threshold|check))
  • Output: Warning to stderr + recorded in state file
  • Format: ⚠️ IGNORED: Prompt matched pattern "[name]" at "[text]" — cannot override [requirement]

See ring:dev-cycle skill's "Custom Prompt Injection" section for full validation logic.

View/modify persisted prompt:

jq '.custom_prompt' docs/ring:dev-cycle/current-cycle.json  # View
# Edit state file, then: /ring:dev-cycle --resume

Examples

# Direct prompt - implement feature
/ring:dev-cycle Implement multi-tenant support with organization_id in all entities

# Direct prompt - another example
/ring:dev-cycle Add idempotency support to transaction create endpoint

# Execute all tasks from a file
/ring:dev-cycle docs/tasks/sprint-001.md

# Execute single task
/ring:dev-cycle docs/tasks/sprint-001.md --task AUTH-001

# Skip DevOps setup (infrastructure already exists)
/ring:dev-cycle docs/tasks/sprint-001.md --skip-gates devops

# Validate tasks without executing
/ring:dev-cycle docs/tasks/sprint-001.md --dry-run

# Resume interrupted cycle
/ring:dev-cycle --resume

# Tasks file with additional context
/ring:dev-cycle docs/tasks/sprint-001.md Prioritize error handling and use existing UserRepository interface

Prerequisites

  1. Task file or prompt: Either a markdown file generated by /pre-dev-* or /ring:dev-refactor, or a direct prompt
  2. Project standards (optional but recommended): docs/PROJECT_RULES.md with project conventions
  3. PRD/TRD (optional): If exists in docs/pre-dev/{feature}/, will be used in design phase

Gates Executed

Gate Skill Description
0 ring:dev-implementation Implement code (TDD)
1 ring:dev-devops Create Docker/compose
2 ring:dev-sre Observability (health checks, logging, tracing)
3 ring:dev-unit-testing Unit tests with 85%+ coverage
4 ring:dev-fuzz-testing Fuzz tests for edge cases
5 ring:dev-property-testing Property-based tests for invariants
6 ring:dev-integration-testing Integration tests with testcontainers
7 ring:dev-chaos-testing Chaos tests for failure scenarios
8 ring:requesting-code-review Code review (5 reviewers in parallel)
9 ring:dev-validation Final validation

Note: Tasks are loaded at initialization, not as a separate gate. All 10 gates are MANDATORY.

After all tasks: ring:dev-feedback-loop generates metrics report.

Output

  • State file: docs/ring:dev-cycle/current-cycle.json (feature) or docs/ring:dev-refactor/current-cycle.json (refactor)
  • Feedback report: docs/dev-team/feedback/cycle-YYYY-MM-DD.md
Command Description
/ring:dev-status Check current cycle status
/ring:dev-cancel Cancel running cycle
/ring:dev-report View feedback report

MANDATORY: Load Full Skill

This command MUST load the skill for complete workflow execution.

Use Skill tool: ring:dev-cycle

The skill contains the complete 10-gate workflow with:

  • Anti-rationalization tables
  • Pressure resistance scenarios
  • TDD sub-phases (Gate 0.1 RED → Gate 0.2 GREEN)
  • Gate completion definitions
  • Incremental compromise prevention
  • State management schema

Execution Context

Pass the following context to the skill:

Parameter Value
tasks-file First argument if it's a .md file path (e.g., docs/tasks/sprint-001.md)
prompt Remaining text after tasks-file and options (direct instruction)
--task If provided, filter to specific task ID
--skip-gates If provided, list of gates to skip
--dry-run If provided, validate only
--resume If provided, resume from existing state file (ring:dev-cycle or ring:dev-refactor)

Argument Parsing:

  • If first argument ends with .md → treat as tasks-file
  • If first argument is an option (--*) → no tasks-file
  • Remaining non-option text → prompt

Step 1: ASK EXECUTION MODE (MANDATORY)

After loading skill and before executing gates, you MUST ask:

AskUserQuestion:
  questions:
    - question: "Select execution mode for this cycle"
      header: "Mode"
      options:
        - label: "Manual per subtask"
          description: "Checkpoint after each subtask"
        - label: "Manual per task"
          description: "Checkpoint after each task"
        - label: "Automatic"
          description: "No checkpoints, run all gates"

Do not skip this. User hints ≠ mode selection. Only explicit selection is valid.

Quick Reference

See skill ring:dev-cycle for full details. Key rules:

  • all 6 gates execute - Checkpoints affect pauses, not gates
  • Gates execute in order - 0 → 1 → 2 → 3 → 4 → 5
  • Gate 4 requires all 5 reviewers - 4/5 = FAIL
  • Coverage threshold - 85% minimum, no exceptions
  • State persisted - Can resume with --resume after any interruption