Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ exclude_paths:
- .github/
- clusters/
- scenarios/ciso/
- scenarios/sre/tools/
- scenarios/tools/
- .pre-commit-config.yaml
38 changes: 19 additions & 19 deletions .ansible-lint-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
clusters/kops/playbooks/roles/kops/tasks/configure_clusters.yaml yaml[line-length]

# command-instead-of-shell is being invoked on files that have to use shell commands
scenarios/sre/project/roles/executables/tasks/check_binary_path.yaml command-instead-of-shell
scenarios/project/roles/executables/tasks/check_binary_path.yaml command-instead-of-shell

# octal-values is being invoked on Kubernetes manifests
scenarios/sre/project/roles/faults/tasks/inject_crashing_kubernetes_workload_init_container.yaml yaml[octal-values]
scenarios/sre/project/roles/faults/tasks/inject_valkey_workload_out_of_memory.yaml yaml[octal-values]
scenarios/sre/project/roles/tools/tasks/install_clickhouse_instances.yaml yaml[octal-values]
scenarios/project/roles/faults/tasks/inject_crashing_kubernetes_workload_init_container.yaml yaml[octal-values]
scenarios/project/roles/faults/tasks/inject_valkey_workload_out_of_memory.yaml yaml[octal-values]
scenarios/project/roles/tools/tasks/install_clickhouse_instances.yaml yaml[octal-values]

# yaml[line-length] is being invoked on task files with long urls
scenarios/sre/project/roles/faults/molecule/inject_opentelemetry_demo_feature_flag/create.yml yaml[line-length]
scenarios/project/roles/faults/molecule/inject_opentelemetry_demo_feature_flag/create.yml yaml[line-length]

# yaml[line-length] is being invoked on groundtruth_v1 manifests
scenarios/sre/project/roles/scenarios/files/scenario_2/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_3/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_5/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_6/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_7/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_8/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_10/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_11/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_13/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_14/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_15/groundtruth_v1.yaml yaml[line-length]
scenarios/sre/project/roles/scenarios/files/scenario_36/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_2/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_3/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_5/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_6/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_7/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_8/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_10/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_11/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_13/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_14/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_15/groundtruth_v1.yaml yaml[line-length]
scenarios/project/roles/scenarios/files/scenario_36/groundtruth_v1.yaml yaml[line-length]

# Legacy files which will eventually be removed or modified
scenarios/sre/project/generate_leaderboard_bundle_status.yaml yaml[line-length]
scenarios/sre/project/roles/leaderboard/tasks/main.yaml ignore-errors
scenarios/project/generate_leaderboard_bundle_status.yaml yaml[line-length]
scenarios/project/roles/leaderboard/tasks/main.yaml ignore-errors
16 changes: 8 additions & 8 deletions .claude/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Then describe what you want to create:

```bash
# 1. Start in the SRE scenarios directory
cd scenarios/sre
cd scenarios

# 2. Scaffold a new fault
make scaffold_fault
Expand Down Expand Up @@ -210,16 +210,16 @@ The `settings.json` allows:

- [Langfuse .claude structure](https://github.com/langfuse/langfuse/tree/main/.claude) - Original inspiration
- [OpenCode.ai Skills Docs](https://opencode.ai/docs/skills/) - Official documentation
- [ITBench Developer Guide](../../scenarios/sre/DEVELOPER_GUIDE.md) - Project context
- [Faults Documentation](../../scenarios/sre/docs/faults.md) - Fault reference
- [Scenarios Documentation](../../scenarios/sre/docs/scenarios.md) - Scenario reference
- [ITBench Developer Guide](../../scenarios/DEVELOPER_GUIDE.md) - Project context
- [Faults Documentation](../../scenarios/docs/faults.md) - Fault reference
- [Scenarios Documentation](../../scenarios/docs/scenarios.md) - Scenario reference

## 🐛 Troubleshooting

### Skills Not Activating

1. Check `skill-rules.json` syntax: `jq . .claude/skills/skill-rules.json`
2. Verify file patterns match: `ls -la scenarios/sre/roles/documentation/files/library/faults/index.json`
2. Verify file patterns match: `ls -la scenarios/roles/documentation/files/library/faults/index.json`
3. Check hook is executable: `ls -la .claude/hooks/`
4. Review hook output: Check for skill suggestions in responses

Expand All @@ -231,9 +231,9 @@ The `settings.json` allows:

### JSON Validation Errors

1. Validate faults index: `jq . scenarios/sre/roles/documentation/files/library/faults/index.json`
2. Validate scenarios index: `jq . scenarios/sre/roles/documentation/files/library/scenarios/index.json`
3. Run linter: `cd scenarios/sre && make lint`
1. Validate faults index: `jq . scenarios/roles/documentation/files/library/faults/index.json`
2. Validate scenarios index: `jq . scenarios/roles/documentation/files/library/scenarios/index.json`
3. Run linter: `cd scenarios && make lint`

## 💡 Tips

Expand Down
14 changes: 7 additions & 7 deletions .claude/agents/sre-scenario-creator.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ Before creating new content, search existing implementations:

```bash
# Find similar faults
grep -r "similar-keyword" scenarios/sre/roles/faults/tasks/
grep -r "similar-keyword" scenarios/roles/faults/tasks/

# Review fault index
cat scenarios/sre/roles/documentation/files/library/faults/index.json | jq '.[] | select(.tags | contains(["keyword"]))'
cat scenarios/roles/documentation/files/library/faults/index.json | jq '.[] | select(.tags | contains(["keyword"]))'

# Check scenario patterns
cat scenarios/sre/roles/documentation/files/library/scenarios/index.json | jq '.[] | select(.category == "sre")'
cat scenarios/roles/documentation/files/library/scenarios/index.json | jq '.[] | select(.category == "sre")'
```

Identify the closest existing fault as a reference template.
Expand All @@ -51,7 +51,7 @@ Identify the closest existing fault as a reference template.
If a new fault is needed:

```bash
cd scenarios/sre
cd scenarios
make scaffold_fault
```

Expand Down Expand Up @@ -117,7 +117,7 @@ Reference similar injection tasks for patterns.
## Step 5: Scaffold the Scenario

```bash
cd scenarios/sre
cd scenarios
make scaffold_scenario
```

Expand Down Expand Up @@ -178,7 +178,7 @@ Remove the scaffolding hint:

1. **Syntax check**:
```bash
cd scenarios/sre
cd scenarios
make lint
```

Expand Down Expand Up @@ -243,7 +243,7 @@ Present results in stages:
## Fault Created: [Fault Name]

**ID**: `fault-id`
**Location**: `scenarios/sre/roles/faults/tasks/inject_fault-id.yaml`
**Location**: `scenarios/roles/faults/tasks/inject_fault-id.yaml`

**Summary**:
- Arguments schema: ✅ Complete
Expand Down
6 changes: 3 additions & 3 deletions .claude/hooks/skill-activation-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ check_file_pattern() {
}

# Check for fault-scaffolding activation
FAULT_INDEX="$CWD/scenarios/sre/roles/documentation/files/library/faults/index.json"
FAULT_INDEX="$CWD/scenarios/roles/documentation/files/library/faults/index.json"
if [ -f "$FAULT_INDEX" ]; then
# Check for TODO patterns in fault index
if check_file_pattern "$FAULT_INDEX" '"alerts":\s*"TODO"' || \
Expand All @@ -40,7 +40,7 @@ if [ -f "$FAULT_INDEX" ]; then
fi

# Check for injection task TODOs
INJECTION_TASKS_DIR="$CWD/scenarios/sre/roles/faults/tasks"
INJECTION_TASKS_DIR="$CWD/scenarios/roles/faults/tasks"
if [ -d "$INJECTION_TASKS_DIR" ]; then
if find "$INJECTION_TASKS_DIR" -name "inject_*.yaml" -exec grep -q "# TODO: LLM-generated injection task" {} \; 2>/dev/null; then
if [[ ! " ${ACTIVATED_SKILLS[@]} " =~ " fault-scaffolding " ]]; then
Expand All @@ -50,7 +50,7 @@ if [ -d "$INJECTION_TASKS_DIR" ]; then
fi

# Check for scenario-scaffolding activation
SCENARIO_INDEX="$CWD/scenarios/sre/roles/documentation/files/library/scenarios/index.json"
SCENARIO_INDEX="$CWD/scenarios/roles/documentation/files/library/scenarios/index.json"
if [ -f "$SCENARIO_INDEX" ]; then
# Check for empty arrays or faultId hint
if check_file_pattern "$SCENARIO_INDEX" '"faultId":' || \
Expand Down
Loading
Loading