home / skills / oimiragieo / agent-studio / parameter-specific-logic-rules

This skill enforces parameter-specific logic by guiding modular rule functions for each region parameter, improving maintainability and extensibility.

npx playbooks add skill oimiragieo/agent-studio --skill parameter-specific-logic-rules

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
2.3 KB
---
name: parameter-specific-logic-rules
description: Rules for implementing parameter-specific logic in the cellular automata simulation. These rules detail how each parameter influences the simulation.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: /src/parameter_logic/**/*.*
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# Parameter Specific Logic Rules Skill

<identity>
You are a coding standards expert specializing in parameter specific logic rules.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- Implement Parameter-Specific Logic:
  - For each parameter in the region structure, create dedicated functions or methods to apply its effects. For example:
    - Obstacle: Turns the cell into an obstacle, preventing it from being randomly selected, and preventing neighbor soup cells from interacting with it.
    - Directional influence: Adjust the probability of a cell interacting with neighbors in specific directions.
    - Randomness: Introduce variability in state transitions or cell behavior.
    - Temperature: Affect the overall activity level or energy of cells within the region.
    - Energy level: Influence the likelihood of certain operations or state changes.
  - Design these functions to be modular and easily expandable, allowing for the addition of new parameters in the future without major code restructuring.
    </instructions>

<examples>
Example usage:
```
User: "Review this code for parameter specific logic rules compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill helps developers implement and review parameter-specific logic rules for a cellular automata simulation. It defines how individual region parameters influence cell behavior and provides modular patterns to keep the code maintainable and extensible. The focus is on clear, testable functions for each parameter effect.

How this skill works

The skill inspects region parameter definitions and maps each to a dedicated function or method that applies its effects to cells. It enforces separation of concerns so parameters like obstacle, directionality, randomness, temperature, and energy are handled independently. The functions are designed to be composable so new parameters can be added without restructuring core logic.

When to use it

  • Designing or refactoring a cellular automata region parameter system
  • Reviewing code for parameter-specific behavior and side effects
  • Adding new environmental parameters to a simulation
  • Writing unit tests for parameter-driven cell behavior
  • Documenting how region parameters change simulation dynamics

Best practices

  • Create one clear function per parameter that accepts a region and applies effects to targeted cells
  • Keep functions pure where feasible and isolate side effects for easier testing
  • Use small, well-documented interfaces for parameter handlers so they can be composed
  • Provide default behavior and allow parameter overrides to avoid special-case branching
  • Write unit tests for each parameter handler and integration tests for combined effects

Example use cases

  • Implement an Obstacle handler that marks cells unselectable and blocks neighbor interactions
  • Add Directional Influence functions to bias neighbor selection probabilities per axis
  • Introduce a Randomness handler that seeds controlled variability in state transitions
  • Model Temperature as a multiplier on cell activity rates or transition probabilities
  • Apply Energy-level rules that gate operations based on per-cell energy counters

FAQ

How should obstacle behavior be enforced?

Mark obstacle cells with a dedicated flag and filter them out from random selection and neighbor interaction routines; keep checks centralized in selection functions.

What pattern is best for combining multiple parameter effects?

Compose parameter handlers in a pipeline: collect candidate cells, then apply parameter functions in a deterministic order so interactions are predictable and testable.