@the-bearded-bear/claude-craft 8.26.0 → 8.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dev/i18n/base/Common/commands/aliases.md +48 -48
- package/Dev/i18n/base/Common/skills/sub-agents-patterns/SKILL.md +1 -0
- package/Dev/i18n/de/Common/agents/devops-engineer.md +19 -14
- package/Dev/i18n/de/Common/agents/migration-specialist.md +10 -15
- package/Dev/i18n/de/Common/agents/mlops-engineer.md +19 -15
- package/Dev/i18n/de/Common/agents/ralph-conductor.md +4 -15
- package/Dev/i18n/de/Common/agents/refactoring-specialist.md +0 -9
- package/Dev/i18n/de/Common/agents/tdd-coach.md +0 -9
- package/Dev/i18n/de/Common/agents/uiux-orchestrator.md +0 -9
- package/Dev/i18n/de/Common/commands/ralph-run.md +52 -0
- package/Dev/i18n/de/Common/commands/research-context7.md +5 -253
- package/Dev/i18n/de/Common/rules/12-context-management.md +10 -8
- package/Dev/i18n/de/Common/templates/settings.json.template +4 -0
- package/Dev/i18n/de/Python/skills/coding-standards/SKILL.md +1 -1
- package/Dev/i18n/de/Python/skills/testing-python/SKILL.md +1 -1
- package/Dev/i18n/de/Python/skills/tooling/SKILL.md +1 -1
- package/Dev/i18n/de/Symfony/commands/check-security.md +20 -20
- package/Dev/i18n/de/Symfony/skills/aggregates/SKILL.md +1 -1
- package/Dev/i18n/de/Symfony/skills/async/SKILL.md +1 -1
- package/Dev/i18n/de/Symfony/skills/cqrs/SKILL.md +1 -1
- package/Dev/i18n/de/Symfony/skills/domain-events/SKILL.md +1 -1
- package/Dev/i18n/de/Symfony/skills/i18n/SKILL.md +1 -1
- package/Dev/i18n/de/Symfony/skills/multitenant/SKILL.md +1 -1
- package/Dev/i18n/de/Symfony/skills/value-objects/SKILL.md +1 -1
- package/Dev/i18n/de/Team/commands/audit.md +29 -4
- package/Dev/i18n/de/Team/commands/delivery.md +29 -4
- package/Dev/i18n/de/Team/commands/security.md +31 -4
- package/Dev/i18n/de/Team/commands/sprint.md +30 -5
- package/Dev/i18n/de/UIUX/commands/audit.md +1 -30
- package/Dev/i18n/de/UIUX/commands/component-spec.md +1 -5
- package/Dev/i18n/de/UIUX/commands/orchestrator.md +5 -98
- package/Dev/i18n/de/Workflow/commands/auto-sprint.md +7 -4
- package/Dev/i18n/de/Workflow/commands/plan.md +1 -2
- package/Dev/i18n/en/Common/agents/devops-engineer.md +19 -14
- package/Dev/i18n/en/Common/agents/migration-specialist.md +10 -15
- package/Dev/i18n/en/Common/agents/mlops-engineer.md +19 -15
- package/Dev/i18n/en/Common/agents/ralph-conductor.md +4 -15
- package/Dev/i18n/en/Common/agents/refactoring-specialist.md +0 -9
- package/Dev/i18n/en/Common/agents/tdd-coach.md +0 -9
- package/Dev/i18n/en/Common/agents/uiux-orchestrator.md +0 -9
- package/Dev/i18n/en/Common/commands/ralph-run.md +52 -0
- package/Dev/i18n/en/Common/commands/research-context7.md +5 -253
- package/Dev/i18n/en/Common/rules/12-context-management.md +12 -10
- package/Dev/i18n/en/Common/templates/settings.json.template +4 -0
- package/Dev/i18n/en/Python/skills/coding-standards/SKILL.md +1 -1
- package/Dev/i18n/en/Python/skills/testing-python/SKILL.md +1 -1
- package/Dev/i18n/en/Python/skills/tooling/SKILL.md +1 -1
- package/Dev/i18n/en/Symfony/commands/check-security.md +20 -20
- package/Dev/i18n/en/Symfony/skills/aggregates/SKILL.md +1 -1
- package/Dev/i18n/en/Symfony/skills/async/SKILL.md +1 -1
- package/Dev/i18n/en/Symfony/skills/cqrs/SKILL.md +1 -1
- package/Dev/i18n/en/Symfony/skills/domain-events/SKILL.md +1 -1
- package/Dev/i18n/en/Symfony/skills/i18n/SKILL.md +1 -1
- package/Dev/i18n/en/Symfony/skills/multitenant/SKILL.md +1 -1
- package/Dev/i18n/en/Symfony/skills/value-objects/SKILL.md +1 -1
- package/Dev/i18n/en/Team/commands/audit.md +29 -4
- package/Dev/i18n/en/Team/commands/delivery.md +29 -4
- package/Dev/i18n/en/Team/commands/security.md +31 -4
- package/Dev/i18n/en/Team/commands/sprint.md +30 -5
- package/Dev/i18n/en/UIUX/commands/audit.md +1 -30
- package/Dev/i18n/en/UIUX/commands/component-spec.md +1 -5
- package/Dev/i18n/en/UIUX/commands/orchestrator.md +5 -98
- package/Dev/i18n/en/Workflow/commands/auto-sprint.md +7 -4
- package/Dev/i18n/en/Workflow/commands/plan.md +1 -2
- package/Dev/i18n/es/Common/agents/devops-engineer.md +19 -14
- package/Dev/i18n/es/Common/agents/migration-specialist.md +10 -15
- package/Dev/i18n/es/Common/agents/mlops-engineer.md +19 -15
- package/Dev/i18n/es/Common/agents/ralph-conductor.md +4 -15
- package/Dev/i18n/es/Common/agents/refactoring-specialist.md +0 -9
- package/Dev/i18n/es/Common/agents/tdd-coach.md +0 -9
- package/Dev/i18n/es/Common/agents/uiux-orchestrator.md +0 -9
- package/Dev/i18n/es/Common/commands/ralph-run.md +52 -0
- package/Dev/i18n/es/Common/commands/research-context7.md +5 -253
- package/Dev/i18n/es/Common/rules/12-context-management.md +9 -7
- package/Dev/i18n/es/Common/templates/settings.json.template +4 -0
- package/Dev/i18n/es/Python/skills/coding-standards/SKILL.md +1 -1
- package/Dev/i18n/es/Python/skills/testing-python/SKILL.md +1 -1
- package/Dev/i18n/es/Python/skills/tooling/SKILL.md +1 -1
- package/Dev/i18n/es/Symfony/commands/check-security.md +20 -20
- package/Dev/i18n/es/Symfony/skills/aggregates/SKILL.md +1 -1
- package/Dev/i18n/es/Symfony/skills/async/SKILL.md +1 -1
- package/Dev/i18n/es/Symfony/skills/cqrs/SKILL.md +1 -1
- package/Dev/i18n/es/Symfony/skills/domain-events/SKILL.md +1 -1
- package/Dev/i18n/es/Symfony/skills/i18n/SKILL.md +1 -1
- package/Dev/i18n/es/Symfony/skills/multitenant/SKILL.md +1 -1
- package/Dev/i18n/es/Symfony/skills/value-objects/SKILL.md +1 -1
- package/Dev/i18n/es/Team/commands/audit.md +29 -4
- package/Dev/i18n/es/Team/commands/delivery.md +29 -4
- package/Dev/i18n/es/Team/commands/security.md +31 -4
- package/Dev/i18n/es/Team/commands/sprint.md +30 -5
- package/Dev/i18n/es/UIUX/commands/audit.md +1 -30
- package/Dev/i18n/es/UIUX/commands/component-spec.md +1 -5
- package/Dev/i18n/es/UIUX/commands/orchestrator.md +5 -98
- package/Dev/i18n/es/Workflow/commands/auto-sprint.md +7 -4
- package/Dev/i18n/es/Workflow/commands/plan.md +1 -2
- package/Dev/i18n/fr/Common/agents/devops-engineer.md +19 -14
- package/Dev/i18n/fr/Common/agents/migration-specialist.md +10 -15
- package/Dev/i18n/fr/Common/agents/mlops-engineer.md +19 -15
- package/Dev/i18n/fr/Common/agents/ralph-conductor.md +4 -15
- package/Dev/i18n/fr/Common/agents/refactoring-specialist.md +0 -9
- package/Dev/i18n/fr/Common/agents/tdd-coach.md +0 -9
- package/Dev/i18n/fr/Common/agents/uiux-orchestrator.md +0 -9
- package/Dev/i18n/fr/Common/commands/ralph-run.md +52 -0
- package/Dev/i18n/fr/Common/commands/research-context7.md +5 -253
- package/Dev/i18n/fr/Common/rules/12-context-management.md +10 -8
- package/Dev/i18n/fr/Common/templates/settings.json.template +4 -0
- package/Dev/i18n/fr/React/commands/check-compliance.md +1 -1
- package/Dev/i18n/fr/React/commands/check-security.md +2 -2
- package/Dev/i18n/fr/Symfony/commands/check-security.md +20 -20
- package/Dev/i18n/fr/Symfony/skills/aggregates/SKILL.md +1 -1
- package/Dev/i18n/fr/Symfony/skills/async/SKILL.md +1 -1
- package/Dev/i18n/fr/Symfony/skills/cqrs/SKILL.md +1 -1
- package/Dev/i18n/fr/Symfony/skills/domain-events/SKILL.md +1 -1
- package/Dev/i18n/fr/Symfony/skills/i18n/SKILL.md +1 -1
- package/Dev/i18n/fr/Symfony/skills/multitenant/SKILL.md +1 -1
- package/Dev/i18n/fr/Symfony/skills/value-objects/SKILL.md +1 -1
- package/Dev/i18n/fr/Team/commands/audit.md +29 -4
- package/Dev/i18n/fr/Team/commands/delivery.md +29 -4
- package/Dev/i18n/fr/Team/commands/security.md +31 -4
- package/Dev/i18n/fr/Team/commands/sprint.md +30 -5
- package/Dev/i18n/fr/UIUX/commands/audit.md +1 -30
- package/Dev/i18n/fr/UIUX/commands/component-spec.md +1 -5
- package/Dev/i18n/fr/UIUX/commands/orchestrator.md +5 -98
- package/Dev/i18n/fr/Workflow/commands/auto-sprint.md +7 -4
- package/Dev/i18n/fr/Workflow/commands/plan.md +1 -2
- package/Dev/i18n/pt/Common/agents/devops-engineer.md +19 -14
- package/Dev/i18n/pt/Common/agents/migration-specialist.md +10 -15
- package/Dev/i18n/pt/Common/agents/mlops-engineer.md +19 -15
- package/Dev/i18n/pt/Common/agents/ralph-conductor.md +4 -15
- package/Dev/i18n/pt/Common/agents/refactoring-specialist.md +0 -9
- package/Dev/i18n/pt/Common/agents/tdd-coach.md +0 -9
- package/Dev/i18n/pt/Common/agents/uiux-orchestrator.md +0 -9
- package/Dev/i18n/pt/Common/commands/ralph-run.md +52 -0
- package/Dev/i18n/pt/Common/commands/research-context7.md +5 -253
- package/Dev/i18n/pt/Common/rules/12-context-management.md +9 -7
- package/Dev/i18n/pt/Common/templates/settings.json.template +4 -0
- package/Dev/i18n/pt/Python/skills/coding-standards/SKILL.md +1 -1
- package/Dev/i18n/pt/Python/skills/testing-python/SKILL.md +1 -1
- package/Dev/i18n/pt/Python/skills/tooling/SKILL.md +1 -1
- package/Dev/i18n/pt/Symfony/commands/check-security.md +20 -20
- package/Dev/i18n/pt/Symfony/skills/aggregates/SKILL.md +1 -1
- package/Dev/i18n/pt/Symfony/skills/async/SKILL.md +1 -1
- package/Dev/i18n/pt/Symfony/skills/cqrs/SKILL.md +1 -1
- package/Dev/i18n/pt/Symfony/skills/domain-events/SKILL.md +1 -1
- package/Dev/i18n/pt/Symfony/skills/i18n/SKILL.md +1 -1
- package/Dev/i18n/pt/Symfony/skills/multitenant/SKILL.md +1 -1
- package/Dev/i18n/pt/Symfony/skills/value-objects/SKILL.md +1 -1
- package/Dev/i18n/pt/Team/commands/audit.md +29 -4
- package/Dev/i18n/pt/Team/commands/delivery.md +29 -4
- package/Dev/i18n/pt/Team/commands/security.md +31 -4
- package/Dev/i18n/pt/Team/commands/sprint.md +30 -5
- package/Dev/i18n/pt/UIUX/commands/audit.md +1 -30
- package/Dev/i18n/pt/UIUX/commands/component-spec.md +1 -5
- package/Dev/i18n/pt/UIUX/commands/orchestrator.md +5 -98
- package/Dev/i18n/pt/Workflow/commands/auto-sprint.md +7 -4
- package/Dev/i18n/pt/Workflow/commands/plan.md +1 -2
- package/Dev/scripts/install-common-rules.sh +8 -0
- package/README.md +12 -8
- package/Tools/Ralph/lib/checkpoint.sh +3 -3
- package/Tools/Ralph/lib/circuit-breaker.sh +10 -10
- package/Tools/Ralph/lib/context-manager.sh +56 -65
- package/Tools/Ralph/lib/context-reconstruction.sh +46 -79
- package/Tools/Ralph/lib/dod-templates.sh +2 -2
- package/Tools/Ralph/lib/dod-validator.sh +18 -18
- package/Tools/Ralph/lib/escalation-service.sh +9 -7
- package/Tools/Ralph/lib/hooks-generator.sh +2 -1
- package/Tools/Ralph/lib/loop-finalizer.sh +1 -1
- package/Tools/Ralph/lib/loop.sh +44 -10
- package/Tools/Ralph/lib/metrics-exporter.sh +1 -1
- package/Tools/Ralph/lib/parallel-manager.sh +173 -88
- package/Tools/Ralph/lib/project-detector.sh +3 -3
- package/Tools/Ralph/lib/recovery-engine.sh +8 -8
- package/Tools/Ralph/lib/session.sh +2 -2
- package/Tools/Ralph/lib/sprint-conductor.sh +167 -124
- package/Tools/Ralph/lib/sprint-progress.sh +9 -9
- package/Tools/Ralph/ralph.sh +66 -38
- package/Tools/StatusLine/statusline.sh +0 -0
- package/Tools/i18n/ralph/de.sh +165 -33
- package/Tools/i18n/ralph/en.sh +132 -0
- package/Tools/i18n/ralph/es.sh +209 -77
- package/Tools/i18n/ralph/fr.sh +234 -102
- package/Tools/i18n/ralph/pt.sh +227 -95
- package/bundles/cursor/.cursorrules +3 -3
- package/bundles/windsurf/.windsurfrules +3 -3
- package/cli/lib/doctor.js +1 -1
- package/config/removed-commands.yaml +61 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: End-to-End-Sprint-Orchestrator (Start -> Zerlegung -> Validierung -> Implementierung -> PR -> CI -> Review -> Retro -> Merge)
|
|
3
|
-
argument-hint: "<N> [--from-prd] [--auto-merge] [--max-fix-attempts=2] [--max-workers=3] [--base=main] [--dry-run] [--overnight]"
|
|
3
|
+
argument-hint: "<N> [--from-prd] [--auto-merge] [--max-fix-attempts=2] [--max-workers=3] [--base=main] [--dry-run] [--overnight] [--engine=subagents|teams]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Auto Sprint — End-to-End-Sprint-Orchestrator
|
|
@@ -31,14 +31,15 @@ $ARGUMENTS
|
|
|
31
31
|
Regel 09, und das Karpathy-Prinzip „kein Auto-Merge ohne menschliche Review").
|
|
32
32
|
- `--max-fix-attempts=2` : Maximale automatische Korrekturversuche pro fehlgeschlagenem Gate vor dem Abbruch (Standard: 2).
|
|
33
33
|
- `--max-workers=3` : Maximale parallele Entwickler-Worker in der Implementierungsphase (Standard: 2, Maximum: 3).
|
|
34
|
+
- `--engine=subagents`: Engine der Implementierungsphase (Standard: `subagents`, Delegation über das `Agent`-Tool). `teams`: experimentelle Agent Teams, mit Fallback auf `subagents`, wenn nicht verfügbar. Siehe `/team:sprint`, Abschnitt „Ausführungs-Engine“
|
|
34
35
|
- `--base=main` : Basis-Branch für den PR (Standard: `main`).
|
|
35
36
|
- `--dry-run` : Gibt die geplanten 9 Phasen und den aufgelösten Sprint-Kontext aus und hält dann an. **Keine Schreibvorgänge.**
|
|
36
37
|
- `--overnight` : Wird an die Implementierungsphase weitergegeben (begrenzt, stoppt um 6 Uhr morgens).
|
|
37
38
|
|
|
38
39
|
## Voraussetzungen
|
|
39
40
|
|
|
40
|
-
- Claude Code v2.1.32+ mit Agent Teams Unterstützung
|
|
41
|
-
- `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` gesetzt
|
|
41
|
+
- Claude Code v2.1.32+ mit Agent Teams Unterstützung — nur mit `--engine=teams`
|
|
42
|
+
- `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` gesetzt — nur mit `--engine=teams`
|
|
42
43
|
- `gh` CLI authentifiziert (PR erstellen / Prüfungen / Merge)
|
|
43
44
|
- Docker verfügbar (alle Tests laufen über Docker — siehe Projekt-CLAUDE.md)
|
|
44
45
|
- BMAD v6-Projekt: `.bmad/sprint-status.yaml` wird bei Bedarf von `/workflow:start` (Phase 1) angelegt
|
|
@@ -106,6 +107,8 @@ Einen isolierten Unter-Agenten starten:
|
|
|
106
107
|
|
|
107
108
|
Direkt die **`/team:sprint`-Dirigenten-Rolle übernehmen** (kein verschachteltes Agent Team starten):
|
|
108
109
|
|
|
110
|
+
**Engine**: Mit `--engine=subagents` (Standard) in Schritt 4 pro Story einen Sub-Agenten über das `Agent`-Tool starten (`isolation: "worktree"`, alle in einer Nachricht) statt `TaskCreate`, und in Schritt 5 auf ihre Rückkehr warten statt `TaskList` abzufragen (vollständige Zuordnung in `/team:sprint`, Abschnitt „Ausführungs-Engine“). Mit `--engine=teams` die Schritte wie beschrieben befolgen.
|
|
111
|
+
|
|
109
112
|
1. `.bmad/sprint-status.yaml` lesen; Stories mit Status `ready-for-dev` filtern.
|
|
110
113
|
2. Datei-Domain-Unabhängigkeit analysieren (`**/Shared/**`, `**/Common/**`, `**/Utils/**`,
|
|
111
114
|
`**/Helpers/**` Überschneidungen markieren → beim gleichen Worker sequenzieren).
|
|
@@ -195,7 +198,7 @@ Phase | Status | Anmerkungen
|
|
|
195
198
|
| Story-DoD-Verfehlung nach Wiederholungen | Als `blocked` markieren, fortfahren, am Ende berichten |
|
|
196
199
|
| CI rot nach Wiederholungen | Abbruch mit Bericht über fehlgeschlagene Prüfungen |
|
|
197
200
|
| Merge blockiert (Schutz / Scope) | Fehler melden + vorgeschlagenes Flag, nicht erzwingen |
|
|
198
|
-
| Agent Teams nicht verfügbar |
|
|
201
|
+
| Agent Teams mit `--engine=teams` nicht verfügbar | Fallback auf `--engine=subagents` (kein Abbruch); `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` setzen, um `--engine=teams` zu nutzen |
|
|
199
202
|
|
|
200
203
|
## Hinweise
|
|
201
204
|
|
|
@@ -69,7 +69,7 @@ Früheres `/workflow:plan --research`. Recherche, Exploration und Constraints vo
|
|
|
69
69
|
| Markt | Bestehende Lösungen? Wettbewerber? Best Practices der Branche? Neue Trends? |
|
|
70
70
|
| Technik | Mögliche Technologien? Integrationen? Skalierbarkeit? Sicherheit / Compliance? |
|
|
71
71
|
|
|
72
|
-
Ist der MCP Context7 konfiguriert, ihn für aktuelle technische Dokumentation nutzen (`/
|
|
72
|
+
Ist der MCP Context7 konfiguriert, ihn für aktuelle technische Dokumentation nutzen (`/deep-research` für tiefgehende Webrecherche; außerhalb von claude.ai der Agent `@research-assistant`).
|
|
73
73
|
|
|
74
74
|
**Constraints**: technische (bestehendes Backend, Datenbank), geschäftliche (Budget, Zeitplan, Abwärtskompatibilität), regulatorische (DSGVO, PCI DSS) und Ressourcen-Constraints (Teamgröße, kein DevOps) dokumentieren.
|
|
75
75
|
|
|
@@ -213,4 +213,3 @@ Bei Unterbrechung erkennt `/workflow:plan --continue`, was vorhanden ist (PRD fe
|
|
|
213
213
|
- `/workflow:status` - Fortschritt prüfen
|
|
214
214
|
- `/project:backlog` - Stories danach hinzufügen, auflisten, bearbeiten und verschieben
|
|
215
215
|
- `/gate:check` - Das Backlog validieren
|
|
216
|
-
- `/common:research-context7` - Tiefgehende Recherche mit Context7 MCP
|
|
@@ -17,20 +17,6 @@ permissionMode: default
|
|
|
17
17
|
skills:
|
|
18
18
|
- git-workflow
|
|
19
19
|
- security
|
|
20
|
-
disallowedTools:
|
|
21
|
-
- "Bash(rm -rf:*)"
|
|
22
|
-
- "Bash(dd:*)"
|
|
23
|
-
- "Bash(mkfs:*)"
|
|
24
|
-
- "Bash(kubectl delete:*)"
|
|
25
|
-
- "Bash(helm uninstall:*)"
|
|
26
|
-
- "Bash(terraform destroy:*)"
|
|
27
|
-
- "Bash(tofu destroy:*)"
|
|
28
|
-
- "Bash(docker system prune -a*)"
|
|
29
|
-
- "Bash(docker volume rm:*)"
|
|
30
|
-
- "Bash(curl * | sh*)"
|
|
31
|
-
- "Bash(wget * | sh*)"
|
|
32
|
-
- "Bash(git push --force*)"
|
|
33
|
-
- "Bash(git push -f*)"
|
|
34
20
|
---
|
|
35
21
|
|
|
36
22
|
# DevOps Engineer Agent
|
|
@@ -242,3 +228,22 @@ strategy:
|
|
|
242
228
|
3. Configure health checks
|
|
243
229
|
4. Prepare rollback
|
|
244
230
|
5. Monitor deployment
|
|
231
|
+
|
|
232
|
+
## Destructive commands guard
|
|
233
|
+
|
|
234
|
+
An agent cannot block a single command: `disallowedTools: Bash(...)` removes all of Bash. These commands therefore go through the permission prompt — always ask for explicit confirmation before running them. To block them in a project, add to its `.claude/settings.json` (the rules also apply to subagents):
|
|
235
|
+
|
|
236
|
+
```json
|
|
237
|
+
{
|
|
238
|
+
"permissions": {
|
|
239
|
+
"deny": [
|
|
240
|
+
"Bash(kubectl delete:*)",
|
|
241
|
+
"Bash(helm uninstall:*)",
|
|
242
|
+
"Bash(terraform destroy:*)",
|
|
243
|
+
"Bash(tofu destroy:*)",
|
|
244
|
+
"Bash(docker volume rm:*)",
|
|
245
|
+
"Bash(docker system prune -a*)"
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
```
|
|
@@ -6,22 +6,13 @@ maxTurns: 6
|
|
|
6
6
|
effort: xhigh
|
|
7
7
|
memory: user
|
|
8
8
|
tools: [Read, Glob, Grep, Bash, WebFetch, WebSearch]
|
|
9
|
-
# Audit 2026-05-18 QW-15 — migrations touch shared/prod databases. Block
|
|
10
|
-
# destructive shell verbs and database drop/truncate. Investigate-then-output
|
|
11
|
-
# is fine; actual destructive execution must require an explicit user opt-in.
|
|
12
|
-
disallowedTools:
|
|
13
|
-
- "Bash(rm -rf:*)"
|
|
14
|
-
- "Bash(dd:*)"
|
|
15
|
-
- "Bash(mkfs:*)"
|
|
16
|
-
- "Bash(:(){:|:&};:*)"
|
|
17
|
-
- "Bash(DROP DATABASE:*)"
|
|
18
|
-
- "Bash(DROP TABLE:*)"
|
|
19
|
-
- "Bash(TRUNCATE:*)"
|
|
20
|
-
- "Bash(pg_dump:*)"
|
|
21
|
-
- "Bash(mysqldump:*)"
|
|
22
|
-
- "Bash(curl * | sh*)"
|
|
23
|
-
- "Bash(wget * | sh*)"
|
|
24
9
|
permissionMode: default
|
|
10
|
+
hooks:
|
|
11
|
+
PreToolUse:
|
|
12
|
+
- matcher: "Bash"
|
|
13
|
+
hooks:
|
|
14
|
+
- type: command
|
|
15
|
+
command: "grep -qiE '(^|[^A-Za-z_])(DROP[[:space:]]+(DATABASE|SCHEMA|TABLE)|TRUNCATE)([^A-Za-z_]|$)' && { echo \"BLOCKED: destructive SQL (DROP DATABASE/SCHEMA/TABLE, TRUNCATE). Hand the command to the user to run it themselves.\" >&2; exit 2; } || exit 0"
|
|
25
16
|
---
|
|
26
17
|
|
|
27
18
|
# Migration Specialist Agent
|
|
@@ -140,3 +131,7 @@ You are a **Senior Migration Specialist** with 12+ years of experience in critic
|
|
|
140
131
|
- [Stripe - Online migrations at scale](https://stripe.com/blog/online-migrations)
|
|
141
132
|
- [Shopify - Sharding playbook](https://shopify.engineering/learnings-from-shopifys-largest-database-sharding-project)
|
|
142
133
|
- [Strangler Fig - Martin Fowler](https://martinfowler.com/bliki/StranglerFigApplication.html)
|
|
134
|
+
|
|
135
|
+
## Destructive SQL guard
|
|
136
|
+
|
|
137
|
+
A `PreToolUse` hook declared in the frontmatter blocks, while this agent runs, any Bash command containing `DROP DATABASE`, `DROP SCHEMA`, `DROP TABLE` or `TRUNCATE` (for instance `psql -c "DROP TABLE …"`): hand the command to the user instead. Migration files written with Edit/Write are not affected. Limits: the hook only runs once the folder is trusted (workspace trust), and it is ignored when the agent is loaded from a plugin.
|
|
@@ -6,21 +6,6 @@ maxTurns: 6
|
|
|
6
6
|
effort: medium
|
|
7
7
|
memory: user
|
|
8
8
|
tools: [Read, Glob, Grep, Edit, Write, Bash, WebFetch, WebSearch]
|
|
9
|
-
# Audit 2026-05-18 QW-15 — MLOps touches feature stores, model registries
|
|
10
|
-
# and inference endpoints (often production). Block destructive verbs on
|
|
11
|
-
# data/model artefacts and on the underlying infra.
|
|
12
|
-
disallowedTools:
|
|
13
|
-
- "Bash(rm -rf:*)"
|
|
14
|
-
- "Bash(dd:*)"
|
|
15
|
-
- "Bash(mkfs:*)"
|
|
16
|
-
- "Bash(kubectl delete:*)"
|
|
17
|
-
- "Bash(helm uninstall:*)"
|
|
18
|
-
- "Bash(mlflow models delete:*)"
|
|
19
|
-
- "Bash(mlflow registered-models delete:*)"
|
|
20
|
-
- "Bash(aws s3 rm:*)"
|
|
21
|
-
- "Bash(gsutil rm:*)"
|
|
22
|
-
- "Bash(curl * | sh*)"
|
|
23
|
-
- "Bash(wget * | sh*)"
|
|
24
9
|
permissionMode: default
|
|
25
10
|
---
|
|
26
11
|
|
|
@@ -262,3 +247,22 @@ if report.as_dict()["metrics"][0]["result"]["dataset_drift"]:
|
|
|
262
247
|
- [Google MLOps Guide](https://cloud.google.com/architecture/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning)
|
|
263
248
|
- [Book: Introducing MLOps](https://www.oreilly.com/library/view/introducing-mlops/9781492083283/)
|
|
264
249
|
- [ML Model Governance](https://learn.microsoft.com/en-us/azure/machine-learning/concept-model-management-and-deployment)
|
|
250
|
+
|
|
251
|
+
## Destructive commands guard
|
|
252
|
+
|
|
253
|
+
An agent cannot block a single command: `disallowedTools: Bash(...)` removes all of Bash. These commands therefore go through the permission prompt — always ask for explicit confirmation before running them. To block them in a project, add to its `.claude/settings.json` (the rules also apply to subagents):
|
|
254
|
+
|
|
255
|
+
```json
|
|
256
|
+
{
|
|
257
|
+
"permissions": {
|
|
258
|
+
"deny": [
|
|
259
|
+
"Bash(kubectl delete:*)",
|
|
260
|
+
"Bash(helm uninstall:*)",
|
|
261
|
+
"Bash(mlflow models delete:*)",
|
|
262
|
+
"Bash(mlflow registered-models delete:*)",
|
|
263
|
+
"Bash(aws s3 rm:*)",
|
|
264
|
+
"Bash(gsutil rm:*)"
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
```
|
|
@@ -5,17 +5,6 @@ model: opus
|
|
|
5
5
|
effort: xhigh
|
|
6
6
|
maxTurns: 10
|
|
7
7
|
memory: user
|
|
8
|
-
disallowedTools:
|
|
9
|
-
- "Bash(rm -rf:*)"
|
|
10
|
-
- "Bash(dd:*)"
|
|
11
|
-
- "Bash(mkfs:*)"
|
|
12
|
-
- "Bash(:(){:|:&};:*)"
|
|
13
|
-
- "Bash(sudo:*)"
|
|
14
|
-
- "Bash(chmod 777:*)"
|
|
15
|
-
- "Bash(curl * | sh*)"
|
|
16
|
-
- "Bash(wget * | sh*)"
|
|
17
|
-
- "Bash(git push --force*)"
|
|
18
|
-
- "Bash(git push -f*)"
|
|
19
8
|
---
|
|
20
9
|
|
|
21
10
|
# Ralph Conductor Agent v2.0
|
|
@@ -186,11 +175,11 @@ Summary:
|
|
|
186
175
|
|
|
187
176
|
## Agent Teams Coordination Mode
|
|
188
177
|
|
|
189
|
-
When operating in Agent Teams mode (activated via `--ralph-mode` on `/team:sprint`), the conductor takes on the role of **team lead** and coordinates a dev teammate through the Claude Code Agent Teams API instead of bash process management.
|
|
178
|
+
When operating in Agent Teams mode (activated via `--ralph-mode` on `/team:sprint --engine=teams`), the conductor takes on the role of **team lead** and coordinates a dev teammate through the Claude Code Agent Teams API instead of bash process management.
|
|
190
179
|
|
|
191
180
|
### Prerequisites
|
|
192
181
|
|
|
193
|
-
- `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` environment variable
|
|
182
|
+
- `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` environment variable (only required by `/team:sprint --engine=teams`)
|
|
194
183
|
- Claude Code v2.1.32+
|
|
195
184
|
- Adapter library: `Tools/AgentTeams/lib/ralph-teams-adapter.sh`
|
|
196
185
|
|
|
@@ -227,8 +216,8 @@ The conductor runs periodic health checks through the adapter's `teams_watchdog(
|
|
|
227
216
|
### Keeping Bash Mode Intact
|
|
228
217
|
|
|
229
218
|
All existing bash-mode orchestration remains unchanged. The Agent Teams mode is activated only when:
|
|
230
|
-
1. The `--ralph-mode` flag is passed to `/team:sprint`
|
|
231
|
-
2. The `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` env var is set
|
|
219
|
+
1. The `--ralph-mode` flag is passed to `/team:sprint --engine=teams`
|
|
220
|
+
2. The `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` env var is set (only required by `/team:sprint --engine=teams`)
|
|
232
221
|
3. The adapter library is available
|
|
233
222
|
|
|
234
223
|
Without these conditions, the conductor operates exactly as before.
|
|
@@ -17,15 +17,6 @@ skills:
|
|
|
17
17
|
- solid-principles
|
|
18
18
|
- kiss-dry-yagni
|
|
19
19
|
- testing
|
|
20
|
-
disallowedTools:
|
|
21
|
-
- "Bash(rm -rf:*)"
|
|
22
|
-
- "Bash(dd:*)"
|
|
23
|
-
- "Bash(mkfs:*)"
|
|
24
|
-
- "Bash(:(){:|:&};:*)"
|
|
25
|
-
- "Bash(sudo:*)"
|
|
26
|
-
- "Bash(chmod 777:*)"
|
|
27
|
-
- "Bash(curl * | sh*)"
|
|
28
|
-
- "Bash(wget * | sh*)"
|
|
29
20
|
---
|
|
30
21
|
|
|
31
22
|
# Refactoring Specialist Agent
|
|
@@ -17,15 +17,6 @@ permissionMode: default
|
|
|
17
17
|
skills:
|
|
18
18
|
- testing
|
|
19
19
|
- solid-principles
|
|
20
|
-
disallowedTools:
|
|
21
|
-
- "Bash(rm -rf:*)"
|
|
22
|
-
- "Bash(dd:*)"
|
|
23
|
-
- "Bash(mkfs:*)"
|
|
24
|
-
- "Bash(:(){:|:&};:*)"
|
|
25
|
-
- "Bash(sudo:*)"
|
|
26
|
-
- "Bash(chmod 777:*)"
|
|
27
|
-
- "Bash(curl * | sh*)"
|
|
28
|
-
- "Bash(wget * | sh*)"
|
|
29
20
|
---
|
|
30
21
|
|
|
31
22
|
# TDD/BDD Coach Agent
|
|
@@ -14,15 +14,6 @@ tools:
|
|
|
14
14
|
- WebFetch
|
|
15
15
|
- WebSearch
|
|
16
16
|
permissionMode: default
|
|
17
|
-
disallowedTools:
|
|
18
|
-
- "Bash(rm -rf:*)"
|
|
19
|
-
- "Bash(dd:*)"
|
|
20
|
-
- "Bash(mkfs:*)"
|
|
21
|
-
- "Bash(:(){:|:&};:*)"
|
|
22
|
-
- "Bash(sudo:*)"
|
|
23
|
-
- "Bash(chmod 777:*)"
|
|
24
|
-
- "Bash(curl * | sh*)"
|
|
25
|
-
- "Bash(wget * | sh*)"
|
|
26
17
|
---
|
|
27
18
|
|
|
28
19
|
# UIUX Orchestrator Agent
|
|
@@ -51,6 +51,12 @@ Execute Claude in a continuous loop until the task is complete or the Definition
|
|
|
51
51
|
- Set max iterations, timeouts, DoD criteria
|
|
52
52
|
- Initialize hooks if enabled
|
|
53
53
|
|
|
54
|
+
#### Session and parallel worker isolation
|
|
55
|
+
|
|
56
|
+
- **Explicit Claude session**: each Ralph session pins its own Claude conversation ID — `claude --session-id <uuid>` on the first iteration, then `claude --resume <uuid>`. The UUID is stored in `.ralph/sessions/<session>/claude_session_id`, so `--continue=<session>` resumes the right conversation. Ralph no longer uses `claude --continue`, which resumed "the most recent conversation in the directory" (shared between workers, or even with the user's interactive session).
|
|
57
|
+
- **One git worktree per worker** (parallel mode, `lib/parallel-manager.sh`): each story runs in a dedicated worktree `.ralph/parallel/worktrees/<session>` on branch `ralph/<session>`, with its Ralph state under `.ralph/parallel/sessions/<session>/ralph/`. At the end of the run, leftover changes are committed as `wip(ralph): <story>` on that branch, then the worktree is removed (`git worktree remove`). If that commit fails, the worktree is kept (no data loss) and reported in `output.log`. Collect the work by merging the `ralph/*` branches.
|
|
58
|
+
- **Outside a git repository**: no worktree; the worker runs in the current directory (a warning is printed), Claude session isolation still applies.
|
|
59
|
+
|
|
54
60
|
### 2. Main Loop with Dashboard
|
|
55
61
|
|
|
56
62
|
```
|
|
@@ -76,6 +82,35 @@ The DoD system validates completion through multiple criteria:
|
|
|
76
82
|
| `hook` | Run existing Claude hook |
|
|
77
83
|
| `human` | Interactive human validation |
|
|
78
84
|
|
|
85
|
+
#### `command` validator limit → use `type: hook`
|
|
86
|
+
|
|
87
|
+
`type: command` only runs commands that pass the allowlist in `Tools/Ralph/lib/dod-validator.sh`: letters, digits, space and `_ . / " ' -`. Any command containing `=`, `|`, `&` or `:` (as well as `;`, `>`, `$`, etc.) is rejected with `ERROR: Invalid command`: the criterion is then **never** met and the loop runs until the circuit breaker trips.
|
|
88
|
+
|
|
89
|
+
| Rejected command | Offending character |
|
|
90
|
+
|------------------|---------------------|
|
|
91
|
+
| `dotnet build /p:TreatWarningsAsErrors=true` | `:` and `=` |
|
|
92
|
+
| `npm test && npm run lint` | `&` |
|
|
93
|
+
| `pytest \| tee out.log` | `\|` |
|
|
94
|
+
|
|
95
|
+
For these cases, put the command in a script and declare it as `type: hook`:
|
|
96
|
+
|
|
97
|
+
```yaml
|
|
98
|
+
definition_of_done:
|
|
99
|
+
checklist:
|
|
100
|
+
- id: build
|
|
101
|
+
type: hook
|
|
102
|
+
script: ".ralph/dod/build.sh"
|
|
103
|
+
required: true
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
#!/usr/bin/env bash
|
|
108
|
+
# .ralph/dod/build.sh — receives {"cwd": ..., "output": ...} as JSON on stdin
|
|
109
|
+
dotnet build /p:TreatWarningsAsErrors=true || exit 2
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The script returns `0` (criterion met) or `2` (criterion failed). Keys read per type: `command` → `command:`, `output_contains` and `file_changed` → `pattern:`, `hook` → `script:`, `human` → `prompt:`.
|
|
113
|
+
|
|
79
114
|
### 4. Adaptive Circuit Breaker (v2.0)
|
|
80
115
|
|
|
81
116
|
Automatically selects profile based on task keywords:
|
|
@@ -100,6 +135,23 @@ Claude works...
|
|
|
100
135
|
Stop → stop-dod-gate.sh → Block if DoD not satisfied (exit 2)
|
|
101
136
|
```
|
|
102
137
|
|
|
138
|
+
## /goal (interactive) or Ralph (autonomous/CI)?
|
|
139
|
+
|
|
140
|
+
`/goal` is a native Claude Code command typed inside a session: it is not a `ralph.sh` option — `ralph.sh` has none for it and never generates a `/goal`. The two tools are complementary:
|
|
141
|
+
|
|
142
|
+
| Criterion | `/goal` (native) | Ralph (`ralph.sh`) |
|
|
143
|
+
|-----------|------------------|--------------------|
|
|
144
|
+
| Completion check | LLM judgment: a small fast model evaluates, after each turn, what is visible in the conversation — it runs no command and reads no file | Deterministic: commands, patterns and hooks run by `dod-validator.sh` |
|
|
145
|
+
| Iteration cap | No fixed cap: ends when the condition is met or judged impossible, on `/goal clear`, or if Claude answers several turns in a row without tools; a bound can be written into the condition | `max_iterations` + adaptive circuit breaker |
|
|
146
|
+
| Headless / CI | `claude -p "/goal ..."` loops to completion in a single invocation; CI usage not documented | Built for it: autonomous runs (`--autonomous`, `--overnight`), `headless` dashboard |
|
|
147
|
+
| `disableAllHooks: true` | Unavailable: `/goal` wraps a session-scoped Stop hook (same with `allowManagedHooksOnly`) | The loop and the DoD run inside `ralph.sh`; only the hooks integration (`stop-dod-gate.sh`) is disabled |
|
|
148
|
+
| Configuration | None; one goal per session, cleared by `/clear` | `ralph.yml` |
|
|
149
|
+
|
|
150
|
+
- **Choose `/goal`** for an interactive task whose completion shows up in the conversation (print the test output: the evaluator does not run it).
|
|
151
|
+
- **Choose Ralph** when completion must be proven by commands, with an iteration cap, unattended or in CI.
|
|
152
|
+
|
|
153
|
+
Reference: [`/goal` documentation](https://code.claude.com/docs/en/goal).
|
|
154
|
+
|
|
103
155
|
## Quick Start Examples
|
|
104
156
|
|
|
105
157
|
```bash
|
|
@@ -1,257 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
|
|
2
|
+
description: "Deprecated (removed in 9.0): use the context7 MCP or /deep-research"
|
|
3
|
+
deprecated: true
|
|
4
|
+
replaced-by: mcp:context7
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
> ⚠️ `/common:research-context7` is deprecated and will be removed in 9.0. Use the context7 MCP or `/deep-research`.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Arguments
|
|
11
|
-
$ARGUMENTS
|
|
12
|
-
|
|
13
|
-
Arguments:
|
|
14
|
-
- Research topic or technical question
|
|
15
|
-
- (Optional) Specific libraries to consult
|
|
16
|
-
|
|
17
|
-
Example: `/common:research-context7 "How to implement OAuth2 authentication with NextAuth.js"` or `/common:research-context7 "React 19 best practices" react,nextjs`
|
|
18
|
-
|
|
19
|
-
## Plan Mode
|
|
20
|
-
|
|
21
|
-
> Plan mode is activated automatically when the scope spans multiple modules or requires cross-cutting investigation.
|
|
22
|
-
|
|
23
|
-
## MISSION
|
|
24
|
-
|
|
25
|
-
### Step 1: Analyze the Request
|
|
26
|
-
|
|
27
|
-
Identify:
|
|
28
|
-
- Main research topic
|
|
29
|
-
- Concerned technologies/libraries
|
|
30
|
-
- Required level of detail
|
|
31
|
-
- Specific questions to answer
|
|
32
|
-
|
|
33
|
-
### Step 2: Use Context7 (MCP)
|
|
34
|
-
|
|
35
|
-
**Context7 provides access to up-to-date library documentation.**
|
|
36
|
-
|
|
37
|
-
#### Search documentation
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
Use MCP context7 tool to:
|
|
41
|
-
1. Search official library documentation
|
|
42
|
-
2. Get up-to-date code examples
|
|
43
|
-
3. Consult official guides and tutorials
|
|
44
|
-
4. Check available APIs
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### Libraries supported by Context7
|
|
48
|
-
|
|
49
|
-
Context7 indexes documentation from many popular libraries:
|
|
50
|
-
- React, Next.js, Vue, Nuxt, Svelte
|
|
51
|
-
- Node.js, Express, Fastify, NestJS
|
|
52
|
-
- Python (Django, FastAPI, Flask)
|
|
53
|
-
- TypeScript, Tailwind CSS
|
|
54
|
-
- And many others...
|
|
55
|
-
|
|
56
|
-
#### Context7 query format
|
|
57
|
-
|
|
58
|
-
To use Context7, I must:
|
|
59
|
-
1. Identify the exact library
|
|
60
|
-
2. Formulate a precise query
|
|
61
|
-
3. Request code examples if relevant
|
|
62
|
-
|
|
63
|
-
### Step 3: Complementary Web Search
|
|
64
|
-
|
|
65
|
-
**Use web search for:**
|
|
66
|
-
|
|
67
|
-
1. **Recent information** (after Context7's cutoff date)
|
|
68
|
-
- New versions
|
|
69
|
-
- Breaking changes
|
|
70
|
-
- Official announcements
|
|
71
|
-
|
|
72
|
-
2. **Community discussions**
|
|
73
|
-
- GitHub issues
|
|
74
|
-
- Stack Overflow discussions
|
|
75
|
-
- Expert blog articles
|
|
76
|
-
|
|
77
|
-
3. **Comparisons and alternatives**
|
|
78
|
-
- Benchmarks
|
|
79
|
-
- Solution comparisons
|
|
80
|
-
- Feedback experiences
|
|
81
|
-
|
|
82
|
-
4. **Specific use cases**
|
|
83
|
-
- Production examples
|
|
84
|
-
- Advanced patterns
|
|
85
|
-
- Solutions to common problems
|
|
86
|
-
|
|
87
|
-
### Step 4: Synthesize Results
|
|
88
|
-
|
|
89
|
-
#### Response Format
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
══════════════════════════════════════════════════════════════
|
|
93
|
-
🔍 RESEARCH: [Topic]
|
|
94
|
-
══════════════════════════════════════════════════════════════
|
|
95
|
-
|
|
96
|
-
──────────────────────────────────────────────────────────────
|
|
97
|
-
📚 OFFICIAL DOCUMENTATION (Context7)
|
|
98
|
-
──────────────────────────────────────────────────────────────
|
|
99
|
-
|
|
100
|
-
### [Library 1]
|
|
101
|
-
|
|
102
|
-
**Current version**: X.Y.Z
|
|
103
|
-
|
|
104
|
-
**Summary**:
|
|
105
|
-
[Summary of found information]
|
|
106
|
-
|
|
107
|
-
**Code example**:
|
|
108
|
-
```[language]
|
|
109
|
-
// Example code from documentation
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**Useful links**:
|
|
113
|
-
- [Link 1]
|
|
114
|
-
- [Link 2]
|
|
115
|
-
|
|
116
|
-
### [Library 2]
|
|
117
|
-
...
|
|
118
|
-
|
|
119
|
-
──────────────────────────────────────────────────────────────
|
|
120
|
-
🌐 WEB SEARCH
|
|
121
|
-
──────────────────────────────────────────────────────────────
|
|
122
|
-
|
|
123
|
-
### Recent Information
|
|
124
|
-
|
|
125
|
-
- [Date]: [Found information]
|
|
126
|
-
- [Date]: [Found information]
|
|
127
|
-
|
|
128
|
-
### Relevant Articles
|
|
129
|
-
|
|
130
|
-
1. **[Article title]**
|
|
131
|
-
- Source: [URL]
|
|
132
|
-
- Summary: [Key points]
|
|
133
|
-
|
|
134
|
-
2. **[Article title]**
|
|
135
|
-
...
|
|
136
|
-
|
|
137
|
-
### Community Discussions
|
|
138
|
-
|
|
139
|
-
- **GitHub Issue**: [Link] - [Summary]
|
|
140
|
-
- **Stack Overflow**: [Link] - [Summary]
|
|
141
|
-
|
|
142
|
-
──────────────────────────────────────────────────────────────
|
|
143
|
-
💡 SYNTHESIS AND RECOMMENDATIONS
|
|
144
|
-
──────────────────────────────────────────────────────────────
|
|
145
|
-
|
|
146
|
-
### Answer to Question
|
|
147
|
-
|
|
148
|
-
[Synthetic answer based on research]
|
|
149
|
-
|
|
150
|
-
### Recommended Approach
|
|
151
|
-
|
|
152
|
-
1. [Step 1]
|
|
153
|
-
2. [Step 2]
|
|
154
|
-
3. [Step 3]
|
|
155
|
-
|
|
156
|
-
### Points of Attention
|
|
157
|
-
|
|
158
|
-
- ⚠️ [Attention point 1]
|
|
159
|
-
- ⚠️ [Attention point 2]
|
|
160
|
-
|
|
161
|
-
### Complete Code Example
|
|
162
|
-
|
|
163
|
-
```[language]
|
|
164
|
-
// Example code compiling found best practices
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
──────────────────────────────────────────────────────────────
|
|
168
|
-
📋 SOURCES
|
|
169
|
-
──────────────────────────────────────────────────────────────
|
|
170
|
-
|
|
171
|
-
Documentation:
|
|
172
|
-
- [Source 1]
|
|
173
|
-
- [Source 2]
|
|
174
|
-
|
|
175
|
-
Web:
|
|
176
|
-
- [Source 1]
|
|
177
|
-
- [Source 2]
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Step 5: Validation
|
|
181
|
-
|
|
182
|
-
#### Verify Source Quality
|
|
183
|
-
|
|
184
|
-
- [ ] Official sources prioritized
|
|
185
|
-
- [ ] Up-to-date information (< 1 year ideally)
|
|
186
|
-
- [ ] Consistency between sources
|
|
187
|
-
- [ ] Testable code examples
|
|
188
|
-
|
|
189
|
-
#### Verify Relevance
|
|
190
|
-
|
|
191
|
-
- [ ] Answers initial question
|
|
192
|
-
- [ ] Appropriate level of detail
|
|
193
|
-
- [ ] Practical examples provided
|
|
194
|
-
- [ ] Alternatives mentioned if relevant
|
|
195
|
-
|
|
196
|
-
### Typical Use Cases
|
|
197
|
-
|
|
198
|
-
#### 1. New Library
|
|
199
|
-
|
|
200
|
-
```
|
|
201
|
-
Question: "How to use [new library]?"
|
|
202
|
-
|
|
203
|
-
→ Context7: Documentation, API, basic examples
|
|
204
|
-
→ Web: Tutorials, feedback, gotchas
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
#### 2. Technical Problem
|
|
208
|
-
|
|
209
|
-
```
|
|
210
|
-
Question: "Why [error] with [library]?"
|
|
211
|
-
|
|
212
|
-
→ Context7: Error documentation, troubleshooting
|
|
213
|
-
→ Web: GitHub issues, Stack Overflow, forums
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
#### 3. Comparison
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
Question: "[Lib A] vs [Lib B] for [use case]?"
|
|
220
|
-
|
|
221
|
-
→ Context7: Features of each lib
|
|
222
|
-
→ Web: Benchmarks, comparisons, expert opinions
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
#### 4. Best Practices
|
|
226
|
-
|
|
227
|
-
```
|
|
228
|
-
Question: "Best practices for [topic]?"
|
|
229
|
-
|
|
230
|
-
→ Context7: Official guidelines
|
|
231
|
-
→ Web: Expert articles, popular patterns
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
#### 5. Migration
|
|
235
|
-
|
|
236
|
-
```
|
|
237
|
-
Question: "Migrate from [v1] to [v2]?"
|
|
238
|
-
|
|
239
|
-
→ Context7: Official migration guide
|
|
240
|
-
→ Web: Feedback experiences, real breaking changes
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### Important Guidelines
|
|
244
|
-
|
|
245
|
-
1. **Always cite sources** - Never invent information
|
|
246
|
-
2. **Prioritize official documentation** - Context7 first
|
|
247
|
-
3. **Check information date** - Web may have obsolete content
|
|
248
|
-
4. **Provide testable code** - Examples must work
|
|
249
|
-
5. **Be honest about limitations** - If information not found, say so
|
|
250
|
-
|
|
251
|
-
### In Case of Doubt
|
|
252
|
-
|
|
253
|
-
If I don't find the information:
|
|
254
|
-
- Clearly indicate what wasn't found
|
|
255
|
-
- Propose alternative paths
|
|
256
|
-
- Suggest where to search manually
|
|
257
|
-
- NEVER invent or hallucinate information
|
|
9
|
+
For "$ARGUMENTS": library docs via the context7 MCP (`resolve-library-id` then `query-docs`), web research via `/deep-research`; outside claude.ai, WebSearch/WebFetch or the `@research-assistant` agent.
|
|
@@ -352,13 +352,15 @@ The `/context` command provides actionable suggestions to optimize context usage
|
|
|
352
352
|
|
|
353
353
|
Adjust the model's effort level based on task complexity:
|
|
354
354
|
|
|
355
|
-
| Command |
|
|
356
|
-
|
|
357
|
-
| `/effort low` |
|
|
358
|
-
| `/effort medium` |
|
|
359
|
-
| `/effort high` |
|
|
360
|
-
| `/effort xhigh` |
|
|
361
|
-
| `/effort ultracode` |
|
|
355
|
+
| Command | Effect | Usage |
|
|
356
|
+
|---------|--------|-------|
|
|
357
|
+
| `/effort low` | Minimal reasoning, fast answers | Simple tasks, lookups, classification |
|
|
358
|
+
| `/effort medium` | Standard depth | Standard implementation |
|
|
359
|
+
| `/effort high` | Deeper reasoning | Complex reasoning, architecture |
|
|
360
|
+
| `/effort xhigh` | Maximum adaptive thinking | Critical decisions, complex migrations, ADR |
|
|
361
|
+
| `/effort ultracode` | Separate toggle (v2.1.284+), Dynamic Workflows | Maximum code throughput — automated pipelines, massive generation |
|
|
362
|
+
|
|
363
|
+
> **Effort does not switch models:** it sets the reasoning depth of the current model; pick the model with `/model`. Recommended pairs: `low` on Haiku 5.5, `medium` on Sonnet 5.5, `high`/`xhigh` on Opus 5.5.
|
|
362
364
|
|
|
363
365
|
> **Default effort per model:** medium on Opus 5.5 and Haiku 5.5; high on Sonnet 5.5, Fable 5.1 and legacy models.
|
|
364
366
|
> **Fable 5.1** (`claude-fable-5-1`, $10/$50 per Mtok) is a current model, suitable for creative/narrative agents. **Mythos** is limited availability (Cyber Verification Program only).
|
|
@@ -493,7 +495,7 @@ During compaction, always preserve:
|
|
|
493
495
|
| Variable | Description |
|
|
494
496
|
|----------|-------------|
|
|
495
497
|
| `CLAUDE_CODE_SUBAGENT_MODEL` | **Default** model for untyped sub-agents (e.g., `sonnet`). **Since Claude Code 2.1.251**, agent frontmatter `model:` takes precedence: the 11 reviewers with `model: haiku` stay on Haiku. **Before 2.1.251 it was the other way round** — this variable overrode the frontmatter. |
|
|
496
|
-
| `CLAUDE_CODE_FORK_SUBAGENT` | `1` to isolate sub-agent contexts (forked subagents, v2.1.117+) |
|
|
498
|
+
| `CLAUDE_CODE_FORK_SUBAGENT` | `1` to isolate sub-agent contexts (forked subagents, v2.1.117+); on by default in `-p`, the SDK, desktop and VS Code since 2.1.302, `0` to turn it off |
|
|
497
499
|
| `ENABLE_PROMPT_CACHING_1H` / `FORCE_PROMPT_CACHING_5M` | Extend/force prompt caching (−40% on repetitive sessions) |
|
|
498
500
|
| `CLAUDE_CODE_DISABLE_AUTO_MEMORY` | Set to `1` to disable automatic memory |
|
|
499
501
|
|
|
@@ -766,7 +768,7 @@ For the 5 `opus` agents (security-auditor, database-architect, migration-special
|
|
|
766
768
|
|
|
767
769
|
**Auto-compaction and skills:** After compaction, skills auto-reload (5K tokens/skill, 25K total max).
|
|
768
770
|
|
|
769
|
-
**Skills with `context: fork
|
|
771
|
+
**Skills with `context: fork`:** every Claude Craft skill over 60 lines uses it (checked by the framework's internal conformance audit).
|
|
770
772
|
|
|
771
773
|
---
|
|
772
774
|
|
|
@@ -797,7 +799,7 @@ Templates available in `.claude/templates/hooks/`: `output-filter.json`, `pre-co
|
|
|
797
799
|
| fallbackModel | Opus reliability — no session interruptions (active by default in settings.json) |
|
|
798
800
|
| PostToolUse hook (Bash+Read) | Reduces context pollution (5K-50K tokens/session on large files) |
|
|
799
801
|
| PreCompact hook | Prevents context loss |
|
|
800
|
-
| context:fork skills (
|
|
802
|
+
| `context: fork` skills (>60 lines) | 2K-15K tokens per long session chaining multiple skills |
|
|
801
803
|
| **Combined total** | **60-75% overall reduction** |
|
|
802
804
|
|
|
803
805
|
> Detailed examples and templates: see `@.claude/references/base/context-management.md`
|