diff --git a/.claude/skills/deepwork_rules.define/SKILL.md b/.claude/skills/deepwork_rules.define/SKILL.md index 3788c946..bac4837b 100644 --- a/.claude/skills/deepwork_rules.define/SKILL.md +++ b/.claude/skills/deepwork_rules.define/SKILL.md @@ -272,10 +272,17 @@ Manages rules that automatically trigger when certain files change during an AI Rules help ensure that code changes follow team guidelines, documentation is updated, and architectural decisions are respected. +IMPORTANT: Rules are evaluated at the "Stop" hook, which fires when an agent finishes its turn. +This includes when sub-agents complete their work. Rules are NOT evaluated immediately after +each file edit - they batch up and run once at the end of the agent's response cycle. +- Command action rules: Execute their command (e.g., `uv sync`) when the agent stops +- Prompt action rules: Display instructions to the agent, blocking until addressed + Rules are stored as individual markdown files with YAML frontmatter in the `.deepwork/rules/` directory. Each rule file specifies: - Detection mode: trigger/safety, set (bidirectional), or pair (directional) - Patterns: Glob patterns for matching files, with optional variable capture +- Action type: prompt (default) to show instructions, or command to run a shell command - Instructions: Markdown content describing what the agent should do Example use cases: @@ -283,6 +290,7 @@ Example use cases: - Require security review when authentication code is modified - Ensure API documentation stays in sync with API code - Enforce source/test file pairing +- Auto-run `uv sync` when pyproject.toml changes (command action) ## Required Inputs diff --git a/.claude/skills/deepwork_rules/SKILL.md b/.claude/skills/deepwork_rules/SKILL.md index d391af84..8ea6f216 100644 --- a/.claude/skills/deepwork_rules/SKILL.md +++ b/.claude/skills/deepwork_rules/SKILL.md @@ -13,10 +13,17 @@ Manages rules that automatically trigger when certain files change during an AI Rules help ensure that code changes follow team guidelines, documentation is updated, and architectural decisions are respected. +IMPORTANT: Rules are evaluated at the "Stop" hook, which fires when an agent finishes its turn. +This includes when sub-agents complete their work. Rules are NOT evaluated immediately after +each file edit - they batch up and run once at the end of the agent's response cycle. +- Command action rules: Execute their command (e.g., `uv sync`) when the agent stops +- Prompt action rules: Display instructions to the agent, blocking until addressed + Rules are stored as individual markdown files with YAML frontmatter in the `.deepwork/rules/` directory. Each rule file specifies: - Detection mode: trigger/safety, set (bidirectional), or pair (directional) - Patterns: Glob patterns for matching files, with optional variable capture +- Action type: prompt (default) to show instructions, or command to run a shell command - Instructions: Markdown content describing what the agent should do Example use cases: @@ -24,6 +31,7 @@ Example use cases: - Require security review when authentication code is modified - Ensure API documentation stays in sync with API code - Enforce source/test file pairing +- Auto-run `uv sync` when pyproject.toml changes (command action) ## Available Steps diff --git a/.deepwork/jobs/deepwork_rules/job.yml b/.deepwork/jobs/deepwork_rules/job.yml index af540bc4..56caa953 100644 --- a/.deepwork/jobs/deepwork_rules/job.yml +++ b/.deepwork/jobs/deepwork_rules/job.yml @@ -6,10 +6,17 @@ description: | Rules help ensure that code changes follow team guidelines, documentation is updated, and architectural decisions are respected. + IMPORTANT: Rules are evaluated at the "Stop" hook, which fires when an agent finishes its turn. + This includes when sub-agents complete their work. Rules are NOT evaluated immediately after + each file edit - they batch up and run once at the end of the agent's response cycle. + - Command action rules: Execute their command (e.g., `uv sync`) when the agent stops + - Prompt action rules: Display instructions to the agent, blocking until addressed + Rules are stored as individual markdown files with YAML frontmatter in the `.deepwork/rules/` directory. Each rule file specifies: - Detection mode: trigger/safety, set (bidirectional), or pair (directional) - Patterns: Glob patterns for matching files, with optional variable capture + - Action type: prompt (default) to show instructions, or command to run a shell command - Instructions: Markdown content describing what the agent should do Example use cases: @@ -17,6 +24,7 @@ description: | - Require security review when authentication code is modified - Ensure API documentation stays in sync with API code - Enforce source/test file pairing + - Auto-run `uv sync` when pyproject.toml changes (command action) changelog: - version: "0.1.0" diff --git a/.deepwork/rules/uv-lock-sync.md b/.deepwork/rules/uv-lock-sync.md new file mode 100644 index 00000000..75cca269 --- /dev/null +++ b/.deepwork/rules/uv-lock-sync.md @@ -0,0 +1,15 @@ +--- +name: UV Lock Sync +trigger: pyproject.toml +action: + command: uv sync +compare_to: prompt +--- + +# UV Lock Sync + +Automatically runs `uv sync` when `pyproject.toml` is modified to keep +`uv.lock` in sync with dependency changes. + +This ensures the lock file is always up-to-date when dependencies are +added, removed, or updated in pyproject.toml. diff --git a/.gemini/skills/deepwork_rules/define.toml b/.gemini/skills/deepwork_rules/define.toml index b0d3f959..3fcd7248 100644 --- a/.gemini/skills/deepwork_rules/define.toml +++ b/.gemini/skills/deepwork_rules/define.toml @@ -275,10 +275,17 @@ Manages rules that automatically trigger when certain files change during an AI Rules help ensure that code changes follow team guidelines, documentation is updated, and architectural decisions are respected. +IMPORTANT: Rules are evaluated at the "Stop" hook, which fires when an agent finishes its turn. +This includes when sub-agents complete their work. Rules are NOT evaluated immediately after +each file edit - they batch up and run once at the end of the agent's response cycle. +- Command action rules: Execute their command (e.g., `uv sync`) when the agent stops +- Prompt action rules: Display instructions to the agent, blocking until addressed + Rules are stored as individual markdown files with YAML frontmatter in the `.deepwork/rules/` directory. Each rule file specifies: - Detection mode: trigger/safety, set (bidirectional), or pair (directional) - Patterns: Glob patterns for matching files, with optional variable capture +- Action type: prompt (default) to show instructions, or command to run a shell command - Instructions: Markdown content describing what the agent should do Example use cases: @@ -286,6 +293,7 @@ Example use cases: - Require security review when authentication code is modified - Ensure API documentation stays in sync with API code - Enforce source/test file pairing +- Auto-run `uv sync` when pyproject.toml changes (command action) ## Required Inputs diff --git a/.gemini/skills/deepwork_rules/index.toml b/.gemini/skills/deepwork_rules/index.toml index 41d4cd9f..a4c2ed02 100644 --- a/.gemini/skills/deepwork_rules/index.toml +++ b/.gemini/skills/deepwork_rules/index.toml @@ -17,10 +17,17 @@ Manages rules that automatically trigger when certain files change during an AI Rules help ensure that code changes follow team guidelines, documentation is updated, and architectural decisions are respected. +IMPORTANT: Rules are evaluated at the "Stop" hook, which fires when an agent finishes its turn. +This includes when sub-agents complete their work. Rules are NOT evaluated immediately after +each file edit - they batch up and run once at the end of the agent's response cycle. +- Command action rules: Execute their command (e.g., `uv sync`) when the agent stops +- Prompt action rules: Display instructions to the agent, blocking until addressed + Rules are stored as individual markdown files with YAML frontmatter in the `.deepwork/rules/` directory. Each rule file specifies: - Detection mode: trigger/safety, set (bidirectional), or pair (directional) - Patterns: Glob patterns for matching files, with optional variable capture +- Action type: prompt (default) to show instructions, or command to run a shell command - Instructions: Markdown content describing what the agent should do Example use cases: @@ -28,6 +35,7 @@ Example use cases: - Require security review when authentication code is modified - Ensure API documentation stays in sync with API code - Enforce source/test file pairing +- Auto-run `uv sync` when pyproject.toml changes (command action) ## Available Steps diff --git a/src/deepwork/standard_jobs/deepwork_rules/job.yml b/src/deepwork/standard_jobs/deepwork_rules/job.yml index af540bc4..56caa953 100644 --- a/src/deepwork/standard_jobs/deepwork_rules/job.yml +++ b/src/deepwork/standard_jobs/deepwork_rules/job.yml @@ -6,10 +6,17 @@ description: | Rules help ensure that code changes follow team guidelines, documentation is updated, and architectural decisions are respected. + IMPORTANT: Rules are evaluated at the "Stop" hook, which fires when an agent finishes its turn. + This includes when sub-agents complete their work. Rules are NOT evaluated immediately after + each file edit - they batch up and run once at the end of the agent's response cycle. + - Command action rules: Execute their command (e.g., `uv sync`) when the agent stops + - Prompt action rules: Display instructions to the agent, blocking until addressed + Rules are stored as individual markdown files with YAML frontmatter in the `.deepwork/rules/` directory. Each rule file specifies: - Detection mode: trigger/safety, set (bidirectional), or pair (directional) - Patterns: Glob patterns for matching files, with optional variable capture + - Action type: prompt (default) to show instructions, or command to run a shell command - Instructions: Markdown content describing what the agent should do Example use cases: @@ -17,6 +24,7 @@ description: | - Require security review when authentication code is modified - Ensure API documentation stays in sync with API code - Enforce source/test file pairing + - Auto-run `uv sync` when pyproject.toml changes (command action) changelog: - version: "0.1.0"