Skip to content

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 20, 2026

Implements a new rule detection mode that only triggers when files are newly created, not when existing files are modified. This enables rules to enforce standards specifically for new code.

  • Add CREATED detection mode to DetectionMode enum
  • Add created_patterns field to Rule dataclass
  • Update schema to validate 'created' field
  • Implement evaluate_created() function
  • Add get_created_files_* functions for each compare_to mode
  • Update evaluate_rule() and evaluate_rules() to handle created mode
  • Update documentation with examples and field reference
  • Add comprehensive tests for created mode (10 new tests)

claude and others added 6 commits January 20, 2026 16:47
Implements a new rule detection mode that only triggers when files are
newly created, not when existing files are modified. This enables rules
to enforce standards specifically for new code.

- Add CREATED detection mode to DetectionMode enum
- Add created_patterns field to Rule dataclass
- Update schema to validate 'created' field
- Implement evaluate_created() function
- Add get_created_files_* functions for each compare_to mode
- Update evaluate_rule() and evaluate_rules() to handle created mode
- Update documentation with examples and field reference
- Add comprehensive tests for created mode (10 new tests)
Triggers when a new job.yml is created in src/deepwork/standard_jobs/
to remind that standard jobs ship with DeepWork and should only be
created when explicitly requested (vs repository or library jobs).
Clarified that standard jobs will be auto-installed in any project using DeepWork.
Update tests to include compare_to="base" after schema change
made compare_to a required field. Also includes ruff formatting.
@nhorton nhorton merged commit 2928d95 into main Jan 20, 2026
4 checks passed
@nhorton nhorton deleted the claude/add-created-rule-mode-ya1N2 branch January 20, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants