Skip to content

Commit 50191c4

Browse files
authored
Merge branch 'main' into ai-logic-share
2 parents 19b6af5 + c40ad12 commit 50191c4

File tree

895 files changed

+27083
-17300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

895 files changed

+27083
-17300
lines changed

.claude/hooks/guard-main-branch.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
# PreToolUse hook: block destructive git operations when on the main branch.
3+
# Non-git tool calls and read-only git commands pass through silently.
4+
5+
set -euo pipefail
6+
7+
input="$(cat)"
8+
tool_name="$(echo "$input" | jq -r '.tool_name // empty')"
9+
10+
# Only care about Bash tool calls
11+
[[ "$tool_name" == "Bash" ]] || exit 0
12+
13+
command="$(echo "$input" | jq -r '.tool_input.command // empty')"
14+
15+
# Only care about git write commands
16+
if [[ "$command" =~ ^git\ (push|reset|revert|checkout|merge|rebase|commit|add) ]]; then
17+
branch="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || true)"
18+
if [[ "$branch" == "main" ]]; then
19+
echo "BLOCK: You are on the main branch. Create or switch to a feature branch first."
20+
fi
21+
fi

.claude/settings.json

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@
3030
"Bash(cargo check:*)",
3131
"mcp__ide__getDiagnostics",
3232
"Bash(npm run generate-backend-client:*)",
33-
"Bash(npm run check:*)"
33+
"Bash(npm run check:*)",
34+
"Bash(git push:*)",
35+
"Bash(git reset:*)",
36+
"Bash(git revert:*)",
37+
"Bash(git checkout:*)",
38+
"Bash(git merge:*)",
39+
"Bash(git rebase:*)",
40+
"Bash(git add:*)",
41+
"Bash(git commit:*)"
3442
],
3543
"deny": [
3644
"Read(.env)",
@@ -55,17 +63,23 @@
5563
"Bash(chown:*)",
5664
"Bash(truncate:*)",
5765
"Bash(shred:*)",
58-
"Bash(unlink:*)",
59-
"Bash(git push:*)",
60-
"Bash(git reset:*)",
61-
"Bash(git revert:*)",
62-
"Bash(git checkout:*)",
63-
"Bash(git merge:*)",
64-
"Bash(git rebase:*)"
66+
"Bash(unlink:*)"
6567
]
6668
},
6769
"enableAllProjectMcpServers": true,
6870
"hooks": {
71+
"PreToolUse": [
72+
{
73+
"matcher": "Bash",
74+
"hooks": [
75+
{
76+
"type": "command",
77+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/guard-main-branch.sh",
78+
"timeout": 5
79+
}
80+
]
81+
}
82+
],
6983
"PostToolUse": [
7084
{
7185
"matcher": "Edit|Write",
@@ -96,7 +110,6 @@
96110
]
97111
},
98112
"enabledPlugins": {
99-
"rust-analyzer-lsp@claude-plugins-official": true,
100113
"typescript-lsp@claude-plugins-official": true,
101114
"code-review@claude-plugins-official": true
102115
}

.claude/skills/refine/SKILL.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: refine
3+
user_invocable: true
4+
description: End-of-session reflection. Reviews friction encountered during the session and proposes updates to docs/ to capture lessons learned.
5+
---
6+
7+
# Refine Skill
8+
9+
Reflect on the current session and update documentation with lessons learned.
10+
11+
## Instructions
12+
13+
1. **Identify friction**: Review what happened in this session:
14+
- Run `git diff main...HEAD --stat` to see what files were touched
15+
- Think about: what was slow, what failed, what required multiple attempts, what information was missing or hard to find
16+
17+
2. **Read current docs**: Read the docs that were relevant to this session:
18+
- `docs/validation.md`
19+
- `docs/enterprise.md`
20+
- `docs/autonomous-mode.md`
21+
- Any skills that were invoked
22+
23+
3. **Propose updates**: For each piece of friction, decide if it warrants a doc update:
24+
- **Missing knowledge**: Information you had to discover that should be documented
25+
- **Wrong guidance**: Instructions that led you astray
26+
- **Missing validation rule**: A check that should be in the validation matrix
27+
- **New pattern**: A codebase pattern worth capturing for next time
28+
29+
4. **Apply updates**: Edit the relevant `docs/` files. Keep changes minimal and specific — add only what would have saved time this session.
30+
31+
5. **Report**: Summarize what was added/changed and why.
32+
33+
## Rules
34+
35+
- Only add knowledge confirmed by this session — no speculative additions
36+
- Keep docs concise — add a line or two, not a paragraph
37+
- If a whole new doc is needed, create it in `docs/` and add a pointer in `CLAUDE.md`
38+
- Don't update skills unless a coding pattern was genuinely wrong
39+
- Don't add things Claude already knows — only Windmill-specific knowledge

0 commit comments

Comments
 (0)