diff --git a/openspec/changes/more-patterns/.openspec.yaml b/openspec/changes/more-patterns/.openspec.yaml new file mode 100644 index 0000000..c0ad5ed --- /dev/null +++ b/openspec/changes/more-patterns/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-11-08 diff --git a/openspec/changes/more-patterns/design.md b/openspec/changes/more-patterns/design.md new file mode 100644 index 0000000..524146b --- /dev/null +++ b/openspec/changes/more-patterns/design.md @@ -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. \ No newline at end of file diff --git a/openspec/changes/more-patterns/proposal.md b/openspec/changes/more-patterns/proposal.md new file mode 100644 index 0000000..f72dcbd --- /dev/null +++ b/openspec/changes/more-patterns/proposal.md @@ -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. \ No newline at end of file diff --git a/openspec/changes/more-patterns/specs/pattern-placement/spec.md b/openspec/changes/more-patterns/specs/pattern-placement/spec.md new file mode 100644 index 0000000..56ab2f5 --- /dev/null +++ b/openspec/changes/more-patterns/specs/pattern-placement/spec.md @@ -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 \ No newline at end of file diff --git a/openspec/changes/more-patterns/tasks.md b/openspec/changes/more-patterns/tasks.md new file mode 100644 index 0000000..6247f28 --- /dev/null +++ b/openspec/changes/more-patterns/tasks.md @@ -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. \ No newline at end of file