docs: complete factual audit pass 2 — 90+ corrections

Second 10-agent parallel audit covering all remaining sections:
ultimate-guide.md (ch1-ch11), workflows/ (17 files), quiz/ (12 files),
examples/agents+skills+commands. Source of truth: official Anthropic docs.

Key corrections:

Hook system (+8 missing events):
- Complete 17-event list: PermissionRequest, PostToolUseFailure, SubagentStart,
  TeammateIdle, TaskCompleted, WorktreeCreate, WorktreeRemove, SessionEnd
- SessionStart confirmed valid (previous audit wrongly doubted it)
- Hook output format: hookSpecificOutput.permissionDecision (not {"decision":"block"})
- Missing common input fields added: transcript_path, cwd, permission_mode

Agent YAML frontmatter (13 valid fields restored/added):
- Restored: disallowedTools, memory, background, isolation, skills, permissionMode, hooks
- Added new: maxTurns, mcpServers
- Fixed: tools format is comma-separated (not space-separated)

Plan Mode (12 occurrences fixed):
- Ctrl+G = "open plan in text editor" (NOT "enter plan mode")
- Plan Mode = Shift+Tab × 2 (Normal → acceptEdits → plan)

Commands table (10.1) + built-in commands (6.1):
- Added 18+ missing commands: /copy, /doctor, /hooks, /memory, /model,
  /config, /permissions, /remote-control, /rename, /resume, /sandbox, etc.

Workflow files:
- agent-teams.md: removed fake --experimental-agent-teams flag
- hooks.yaml + post_edit event → settings.json + PostToolUse (2 files)
- TodoWrite → TaskCreate/TaskUpdate (3 files)
- task-management.md: removed fake "failed" task status

Quiz / examples:
- 01-010: Esc stops mid-action (not Ctrl+C)
- refactoring-specialist.md: removed MultiEdit (not a valid tool)
- ast-grep-patterns.md: name field (not title)
- validate-changes.md, diagnose.md: field name fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Florian BRUNIAUX 2026-02-26 18:21:28 +01:00
parent 8cb9f9efa6
commit 4a0a0bf30e
22 changed files with 365 additions and 322 deletions

View file

@ -284,10 +284,10 @@ openspec init
/openspec:archive add-dark-mode # Merge to specs
```
### With /plan Mode
### With Plan Mode
```
/plan
[Press Shift+Tab to enter Plan Mode]
I need to implement the Payment Processing feature.
Review the spec in CLAUDE.md and create an implementation plan.
@ -501,14 +501,15 @@ Traditional specs use binary constraints (MUST/MUST NOT), but operational work r
### Mapping to Claude Code Permissions
**Always → Auto-accept Mode** (Shift+Tab):
**Always → Permission Allowlist**:
```json
// In .claude/settings.json
{
"allowedPrompts": {
"Bash": [
"run tests",
"format code",
"check types"
"permissions": {
"allow": [
"Bash(npm test*)",
"Bash(npx prettier*)",
"Bash(npx tsc*)"
]
}
}
@ -520,11 +521,11 @@ Traditional specs use binary constraints (MUST/MUST NOT), but operational work r
**Never → Plan Mode + Hooks**:
```bash
# .claude/hooks/pre-tool-use.sh
# Hook configured via settings.json (PreToolUse event)
#!/bin/bash
if [[ "$TOOL_USE_TOOL_NAME" == "Bash" ]] && [[ "$TOOL_USE_INPUT" =~ "git push origin main" ]]; then
echo "ERROR: Direct push to main blocked. Use feature branches."
exit 2 # Block the action
if [[ "$TOOL_NAME" == "Bash" ]] && [[ "$INPUT" =~ "git push origin main" ]]; then
echo "BLOCKED: Direct push to main blocked. Use feature branches."
exit 2 # Send feedback to Claude (non-zero exit blocks the action)
fi
```