docs: add more-patterns OpenSpec change
Plan 6 additional built-in patterns mapped to digit keys 5-0.
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-11-08
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Design
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
Pattern module currently has 4 patterns with static offsets. Config maps digits 1-4.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
- Add 6 patterns with correct offsets.
|
||||||
|
- Extend default config digits 5-0.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
- Pattern editor.
|
||||||
|
- Loading from files.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
### D1: Pattern storage
|
||||||
|
- Add static offset arrays and entries in `patterns[]`.
|
||||||
|
|
||||||
|
### D2: Key mapping
|
||||||
|
- 5=Beacon, 6=Loaf, 7=Boat, 8=Tub, 9=R-pentomino, 0=Acorn.
|
||||||
|
|
||||||
|
### D3: Config enum
|
||||||
|
- Add `ACTION_SELECT_BEACON` etc. or refactor? Use new enum values for minimal change.
|
||||||
|
|
||||||
|
## Open Questions
|
||||||
|
|
||||||
|
None.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# Proposal
|
||||||
|
|
||||||
|
## Why
|
||||||
|
|
||||||
|
The tool currently offers only 4 patterns. Adding a broader set (Beacon, Loaf, Boat, Tub, R-pentomino, Acorn) makes it more useful for exploring Life dynamics.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Add 6 new built-in patterns.
|
||||||
|
- Extend pattern module and count to 10.
|
||||||
|
- Add default key bindings 5–0 for the new patterns.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
- `pattern-placement`: additional built-in patterns and their key bindings.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
- Affected code: `pattern.c/h`, `config.c`, `wlgol.c` (enum/actions if needed).
|
||||||
|
- No new dependencies.
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Spec Delta
|
||||||
|
|
||||||
|
## ADDED Requirements
|
||||||
|
|
||||||
|
### Requirement: Additional built-in patterns are available
|
||||||
|
The system SHALL provide additional built-in patterns (Beacon, Loaf, Boat, Tub, R-pentomino, Acorn) selectable via keys 5-0.
|
||||||
|
|
||||||
|
#### Scenario: Select beacon
|
||||||
|
- **WHEN** the user triggers `select:beacon`
|
||||||
|
- **THEN** a beacon preview is shown
|
||||||
|
|
||||||
|
### Requirement: New patterns support rotation
|
||||||
|
The system SHALL support 90-degree rotation for all new patterns.
|
||||||
|
|
||||||
|
#### Scenario: Rotate new pattern
|
||||||
|
- **WHEN** the user rotates a new pattern preview
|
||||||
|
- **THEN** its cells rotate accordingly
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Tasks
|
||||||
|
|
||||||
|
## 1. Pattern module
|
||||||
|
|
||||||
|
- [ ] 1.1 Add offset arrays for Beacon, Loaf, Boat, Tub, R-pentomino, Acorn.
|
||||||
|
- [ ] 1.2 Register new patterns in patterns[] and update pattern_count to 10.
|
||||||
|
|
||||||
|
## 2. Config
|
||||||
|
|
||||||
|
- [ ] 2.1 Add select actions for new patterns and default bindings 5-0.
|
||||||
|
- [ ] 2.2 Update config defaults and default file content.
|
||||||
|
|
||||||
|
## 3. Verification
|
||||||
|
|
||||||
|
- [ ] 3.1 Build and run ctest.
|
||||||
|
- [ ] 3.2 Manual test selecting/rotating new patterns.
|
||||||
Reference in New Issue
Block a user