feat: v11.1.0 โ workflow enforcement hooks + alignment#49
feat: v11.1.0 โ workflow enforcement hooks + alignment#49
Conversation
- Enforcement hooks: full v11 table (11 hooks with Rust annotations) - Model routing: 18 models with actual v11 names (Opus 4.6, GPT-5.3-Codex, etc.) - Dashboards: claude-core server/tui as primary, Python as legacy - Token optimization: Rust digest, Rust hooks, 91 agents optimized - What MyConvergio does: +3 rows (Rust perf, backup/restore, night agent) - Squad comparison: updated with Rust, 91 agents, 18 models, 4 providers - CLI commands section with doctor/backup/rollback - Documentation table: +migration guide, +troubleshooting, +23 ADRs - install.sh: pre-migration v10 backup before pulling v11 code Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- .claude/settings.json with workflow-enforcer.sh + post-task-enforce.sh - .github/copilot-instructions.md with mandatory workflow sequence - .gitignore: track .claude/settings.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add workflow-enforcer.sh (PreToolUse) and post-task-enforce.sh (PostToolUse) - Add rules/workflow-enforced.md as single source of truth - Update .claude/CLAUDE.md hook references (enforce-planner โ workflow-enforcer) - Add hook enforcement table to root CLAUDE.md - Bump VERSION to 11.1.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
๐ก Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a2ea10d2a
โน๏ธ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with ๐.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| PLAN_ID=$(echo "$COMMAND" | grep -oE '[0-9]+' | head -1) | ||
| if [ -n "$PLAN_ID" ] && [ -f "$DB" ]; then | ||
| UNVALIDATED=$(sqlite3 "$DB" "SELECT COUNT(*) FROM tasks WHERE plan_id=$PLAN_ID AND status='submitted';" 2>/dev/null || echo "0") |
There was a problem hiding this comment.
Extract plan ID from merge args, not first numeric token
PLAN_ID is taken with grep -oE '[0-9]+' | head -1 from the full shell command, so any earlier number (for example in cd /tmp/run-2026 && wave-worktree.sh merge 42 1) is treated as the plan ID. That makes the SQL check query the wrong plan and can incorrectly allow merges/completions even when the target plan still has unvalidated tasks.
Useful? React with ๐ย / ๐.
| echo "$COMMAND" | grep -qE "plan-db-safe\.sh" && exit 0 | ||
| echo "$COMMAND" | grep -qE "planner-create\.sh" && exit 0 |
There was a problem hiding this comment.
Run merge/complete guards before broad allowlist exits
The script exits immediately for any command containing plan-db-safe.sh or planner-create.sh, but those checks run before the merge/complete enforcement logic. A chained command like plan-db-safe.sh ... && wave-worktree.sh merge ... will be fully allowed and skip Thor-validation gating, which defeats the new enforcement for common multi-command Bash invocations.
Useful? React with ๐ย / ๐.
| TASK_ID=$(echo "$COMMAND" | grep -oE '[0-9]+' | head -1) | ||
| PLAN_ID=$(echo "$COMMAND" | grep -oE '[0-9]+' | head -2 | tail -1) |
There was a problem hiding this comment.
Parse task/plan IDs from arguments in post-task hook
The post-task hook derives TASK_ID and PLAN_ID from the first two numeric substrings in the entire command, which is brittle when the command includes other numbers (paths, env vars, timestamps, etc.). In those cases it can checkpoint the wrong plan and show incorrect validation guidance after task completion.
Useful? React with ๐ย / ๐.
Summary
workflow-enforcer.sh(PreToolUse) andpost-task-enforce.sh(PostToolUse) hooks to enforce planner/executor/thor workflowrules/workflow-enforced.mdas single source of truth for workflow steps.claude/CLAUDE.mdhook references from staleenforce-planner-workflow.shto activeworkflow-enforcer.shCLAUDE.mdTest plan
make testpassesmake lintpassesworkflow-enforcer.shblocksEnterPlanModein Claude Code sessionpost-task-enforce.shfires afterplan-db-safe.sh update-task donecopilot-instructions.md