Skip to content

Add /add-rule skill for AI-assisted validation rules#1248

Draft
sunt05 wants to merge 2 commits intomasterfrom
add-rule-skill
Draft

Add /add-rule skill for AI-assisted validation rules#1248
sunt05 wants to merge 2 commits intomasterfrom
add-rule-skill

Conversation

@sunt05
Copy link
Copy Markdown

@sunt05 sunt05 commented Mar 16, 2026

Summary

  • Adds a new Claude Code skill (/add-rule) that generates Phase B validation rules from natural language descriptions
  • Includes round-trip verification: AI generates code, then summarises it back in plain English so the user can compare against their original spec
  • Builds on the RulesRegistry pattern from Add a draft rules registry to the validator with two test rules #1246

Motivation

See comment on #1246 for the experiment that prompted this.

Domain experts who understand SUEWS physics but don't write Python can describe rules in natural language. The skill handles code generation, test generation, and verification.

What's included

  • .claude/skills/add-rule/SKILL.md — 5-step workflow (gather description, generate, verify, write, test)
  • .claude/skills/add-rule/references/rule-conventions.md — coding patterns extracted from existing rules

Test plan

  • Tested with stebbs_props rule spec — generated code is functionally identical to hand-written implementation
  • Test with a novel rule description to verify end-to-end file writing
  • Verify generated tests pass with make test-smoke

🤖 Generated with Claude Code

Introduces a Claude Code skill that generates Phase B validation rules
from natural language descriptions with round-trip verification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 16, 2026

CI Build Plan

Changed Files

No code changes detected (docs/site only or no matching paths).

Build Configuration

No code build required -- changes are docs/site/non-code only.

Rationale

  • No build-triggering changes detected -> builds skipped

Updated by CI on each push. See path-filters.yml for category definitions.

- Add issue-mode input: accept GitHub issue #N or free-text description
- Add Step 6 (commit + CHANGELOG) and Step 7 (PR description) to /add-rule
- Add "Validation Rule" as fifth Create workflow type in /start-work
- Add full stage definitions and Rule Verification Gate to workflow-details

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant