
development-loop
by wack
Wack's API Gateway
SKILL.md
name: development-loop description: Red-green-refactor development loop for implementing Gateway API conformance tests. Use this skill when working on implementing new conformance tests for the multiway project. It guides the agent through selecting the next test to implement based on priority tiers, running the conformance suite, diagnosing failures, and implementing fixes.
Development Loop for Gateway API Conformance Implementation
You are an expert in implementing Kubernetes Gateway API conformance tests. You follow a disciplined red-green-refactor development loop to systematically implement support for each test case in the official Gateway API conformance suite.
Overview
This skill guides you through a development loop for implementing conformance tests one at a time. Each iteration of the loop:
- Selects the highest-priority unimplemented test
- Verifies the test is currently skipped
- Enables the test and observes the failure
- Diagnoses the root cause
- Implements and verifies the fix
- Documents the results
CRITICAL: All conformance tests MUST be run locally using the gateway-conformance-runner skill's local testing workflow. Never run tests in-cluster during development.
Test Priority Tiers
Test cases have been prioritized into 7 tiers, stored in CSV files within this skill's directory:
| File | Priority | Description |
|---|---|---|
test-tiers/tier-1-essential.csv | Highest | Core functionality that must work |
test-tiers/tier-2-important-http.csv | High | Important HTTP routing features |
test-tiers/tier-3-production.csv | Medium-High | Production-ready features |
test-tiers/tier-4-advanced.csv | Medium | Advanced routing capabilities |
test-tiers/tier-5-observability.csv | Medium-Low | Observability features |
test-tiers/tier-6-validation.csv | Low | Validation and edge cases |
test-tiers/tier-7-not-relevant.csv | Lowest | Tests not relevant to this implementation |
Each CSV file has the following columns:
test_name: The name of the conformance testdescription: A brief description of what the test validatesimplemented: Status -false,in-progress, ortrue
Development Loop Steps
Step 1: Select the Next Test
Use the pick-next.sh helper script to select and enable the next test:
# See what test is next without enabling it
./pick-next.sh --show-next
# Enable the next test (removes t.Skip() and marks as in-progress)
./pick-next.sh
The script will:
- Scan tier CSV files in priority order (tier-1 first, tier-7 last)
- Find the first test where
implementedisfalseorin-progress - If
false, enable the test by removingt.Skip()from the conformance suite - Update the CSV status to
in-progress
IMPORTANT: After running pick-next.sh, you MUST inform the user which test was selected by clearly stating:
- The test name (e.g.,
HTTPRouteSimpleSameNamespace) - The test description (e.g., "Basic HTTP routing from a route to a backend service in the same namespace")
This ensures the user understands what functionality is being implemented in this iteration.
Example output to user:
The next test to implement is HTTPRouteSimpleSameNamespace: Basic HTTP routing from a route to a backend service in the same namespace. This is the foundation of all routing functionality.
Step 2: Verify Test is Currently Skipped
Before making any code changes, verify the current state:
- Ensure the
GATEWAY_CONFORMANCE_SUITEenvironment variable is set - Navigate to
$GATEWAY_CONFORMANCE_SUITE - Use the
gateway-conformance-runnerskill to run the conformance suite locally - Verify:
- The selected test is currently skipped (not running)
- All other enabled tests are passing
If other tests are failing, stop and address those failures first before enabling a new test.
Step 3: Enable the Test and Observe Failure
- Enable the test by removing it from the skip list or adding it to the enabled tests in the conformance configuration
- Run the conformance suite again using
gateway-conformance-runner - Observe and capture the test failure output
- Document the specific failure message and any relevant stack traces
Step 4: Handle Test Results
If the test passes immediately:
- Update the CSV file to change
implementedfromin-progresstotrue - Document this finding (the feature was already implemented)
- Return to Step 1 to select the next test
If the test fails:
- Proceed to Step 5 (Diagnosis)
Step 5: Diagnose the Failure
5a: Attempt to Create a Unit Test (Recommended)
Before diving into the implementation, try to recreate the conformance test as a purely functional unit test within this repository:
- Study the conformance test implementation in
$GATEWAY_CONFORMANCE_SUITE/conformance - Understand what scenario the test is validating
- Create a unit test using this project's testing patterns:
- Use
snapshotsemantics for expected outputs - Use
world statesemantics for modeling the reconciler - Implement as a purely functional controller test
- Use
Having a local unit test provides:
- Faster iteration cycles
- Easier debugging
- Better test isolation
- Documentation of the expected behavior
If you cannot successfully create a unit test, proceed to the next step.
5b: Investigate Root Cause
- Analyze the failure message to identify the failing assertion
- Trace through the code to understand the request flow:
- Control plane: How are resources being reconciled?
- Data plane: How are requests being routed?
- Identify the specific code paths responsible for the failure
- Document your findings
5c: File a Bug Report
Create a Markdown file in ./bug-reports/ documenting:
# Bug Report: [Test Name]
## Test Description
[What the conformance test is validating]
## Failure Message
[The exact error message from the conformance test]
## Root Cause Analysis
[Your findings about why the test is failing]
## Affected Code
- Control plane: [relevant files/functions]
- Data plane: [relevant files/functions]
## Proposed Fix
[Your plan to address the issue]
Step 6: Implement the Fix
- Make the necessary code changes to fix the identified issue
- Keep changes minimal and focused on the specific test
- Follow the project's coding conventions and patterns
Step 7: Verify the Fix
- If you created a unit test in Step 5a, run it first:
cargo nextest run [test_name] - Run the full conformance suite using
gateway-conformance-runner - Verify:
- The previously failing test now passes
- No other tests have regressed
If verification fails, return to Step 5 to continue diagnosis.
Step 8: Document and Report
Once the test passes:
-
Update the CSV file to change
implementedfromin-progresstotrue -
Create a summary report with the following format:
## Test Completed: [Test Name]
### Summary
[Brief description of what was implemented]
### Changes Made
**Before:**
[Code or behavior before the fix]
**After:**
[Code or behavior after the fix]
### Files Modified
- `path/to/file1.rs`: [description of changes]
- `path/to/file2.rs`: [description of changes]
### Unit Test Added
[Yes/No - if yes, describe the test]
### Lessons Learned
[Any insights that might help with future tests]
- Return to Step 1 to continue with the next test
Running Conformance Tests Locally
Always use the gateway-conformance-runner skill for running conformance tests. The local testing workflow provides:
- Faster iteration cycles
- Real-time output for debugging
- Direct access to test logs
- Ability to run individual tests
Key commands:
# Verify environment
echo $GATEWAY_CONFORMANCE_SUITE
# Run conformance tests locally
cd $GATEWAY_CONFORMANCE_SUITE && make conformance
Best Practices
- One test at a time: Focus on a single test per iteration
- Verify first: Always confirm the test is skipped before enabling
- Minimal changes: Make the smallest change needed to pass the test
- Document everything: Keep thorough records in bug reports and summaries
- Unit tests preferred: Local unit tests make debugging much faster
- No regressions: Ensure all previously passing tests continue to pass
Error Recovery
If you encounter issues:
- Wrong kubectl context: Stop immediately, switch to the correct context
- Conformance suite not found: Verify
GATEWAY_CONFORMANCE_SUITEis set correctly - Multiple tests failing: Address failing tests before enabling new ones
- Stuck on a test: Document findings, mark as
in-progress, and consider moving to the next test with a note
Helper Script: pick-next.sh
A helper script is provided to automate common development loop tasks:
# Location
.claude/skills/development-loop/pick-next.sh
Script Features
The pick-next.sh script automates:
- CSV Concatenation: Combines all tier files in priority order (tier-1 first)
- Next Test Selection: Finds the first test with status
in-progressorfalse - Test Enabling: Uses AST-Grep to remove
t.Skip()calls from conformance tests
Usage
# Show the next test to work on
./pick-next.sh --show-next
# Enable the next test (removes t.Skip() and updates CSV to in-progress)
./pick-next.sh
# Preview what would be done without making changes
./pick-next.sh --dry-run
# List all tests in priority order with their status
./pick-next.sh --list-all
# Show help
./pick-next.sh --help
Requirements
- GATEWAY_CONFORMANCE_SUITE: Environment variable pointing to the Gateway API repository clone
- ast-grep (optional): The script will install it via cargo if not available, or fall back to sed
Example Workflow
# 1. See what test to work on next
./pick-next.sh --show-next
# 2. Enable the test (removes t.Skip() and marks as in-progress)
./pick-next.sh
# 3. Run conformance tests to see the failure
cd $GATEWAY_CONFORMANCE_SUITE && make conformance
# 4. Implement the fix in the multiway codebase
# 5. Verify the fix passes
cd $GATEWAY_CONFORMANCE_SUITE && make conformance
# 6. Manually update the CSV to mark as 'true' when complete
Files and Directories
./pick-next.sh: Helper script for development loop automation./test-tiers/*.csv: Test priority lists and implementation status./bug-reports/: Diagnostic reports for failing tests$GATEWAY_CONFORMANCE_SUITE/conformance: The official conformance test suite
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です