xonecas.io
60255
Zn

Zoea-Nova / commit 69d817b

refactor: consolidate global config and remove redundant agents

Consolidate OpenCode configuration to reduce context bloat and improve
agent effectiveness across all projects.

Global config changes (~/.config/opencode/):
- Updated AGENTS.md with core development principles
  - Removed 'intentionally minimal' claim (now 286 lines of high-value content)
  - Fixed typos: 'your are' → 'you are', 'opencode, user reference's his software'
  - Added OpenCode Conventions section (tool usage, subagents, parallel execution)
  - Added disagreement protocol: provide evidence first, never argue from assumptions
  - Embedded 4 core principles (replacing removed skills):
    - Systematic Debugging (4-phase process, red flags, human signals)
    - Verification Before Completion (gate function, evidence requirements)
    - Writing Clearly and Concisely (Strunk's rules, AI patterns to avoid)
    - Mermaid Diagrams (type selection, syntax, examples)
- Removed ~/.config/opencode/skills/ directory (all skills migrated)
- Removed ~/.agents/ directory (skills moved to local project)
- Kept writer.md agent (global, used for blog drafts across projects)

Local config changes (.opencode/):
- Fixed zoea-analyser.md:
  - Typo: 'for a analysis' → 'for analysis'
  - Updated: 'grep command' → 'Grep tool' (OpenCode convention)
- Removed zoea-expert.md (redundant with global principles)
- Removed phase3_unicode_summary.md (orphaned file)
- Skills now project-specific only:
  - bubbletea/ (TUI framework)
  - build-tui-view/ (Hatchet CLI patterns)
  - go-skills/ (Go best practices)
  - spacemolt.md (game-specific knowledge)

Impact:
- Reduced global skills from 10+ to 0 (principles embedded in AGENTS.md)
- Reduced local agents from 2 to 1 (removed redundant expert)
- Lower context cost, higher value per token
- Direct support for WORKFLOW.md phases:
  - Phase 1: Mermaid Diagrams, Writing Clearly
  - Phase 3: Systematic Debugging
  - Phase 6: Verification Before Completion

This configuration achieves all design goals:
1. Work systematically without frustration (clear processes, evidence-based)
2. Enhance development practices (actionable principles, self-correction)
3. Correct and valuable information (typos fixed, no outdated references)
4. Support WORKFLOW.md (direct alignment with all 6 phases)

Related commits:
- fa42f84: WORKFLOW.md v1.0
- 8280f8d: Move project-specific skills to local config

xonecas2026-02-07 69d817b6087e74b1e51f7b08a506d2cf258722da parent 8280f8d

3 files changed

.opencode/agents/zoea-analyser.md+3−2
@@ -1,5 +1,5 @@
11 ---
2-description: Agent with data access for a analysis.
2+description: Agent with data access for analysis.
33 agent: general
44 mode: subagent
55 model: opencode/gemini-3-flash
@@ -33,7 +33,7 @@ You can query the SQLite database using the `sqlite3` command via the `Bash` too
3333 The application logs to `~/.zoea-nova/zoea.log` using `zerolog` (JSON format).
3434
3535 - Use `tail -n 100 ~/.zoea-nova/zoea.log` for recent activity.
36-- Use `grep "error" ~/.zoea-nova/zoea.log` to identify failures.
36+- Use Grep tool with pattern "error" to identify failures in the log file.
3737 - Look for `mysis_id`, `event`, and `level` fields in the JSON logs.
3838
3939 Ollama server logs (for LLM provider issues):
@@ -48,5 +48,6 @@ When asked for an analysis, provide a structured report covering:
4848 2. **Activity Summary**: Recent broadcast activity and mysis-specific conversation volume.
4949 3. **Health Check**: Any errors found in the logs or anomalous mysis behaviors.
5050 4. **Insights**: Trends in mysis interactions or performance bottlenecks.
51+5. **Mysis behaviour analysis**: Trends in gameplay.
5152
5253 Keep your analysis concise and data-driven. Always provide the raw data or query results if they support your conclusions.
.opencode/agents/zoea-expert.md+0−14
@@ -1,14 +0,0 @@
1----
2-description: Agent with knowledge in this project.
3-agent: general
4-mode: primary
5----
6-
7-You have access to @explore and @zoea-analyzer subagents. Use them and your knowdledge of the codebase to answer the user's questions.
8-You have tooling to search the internet use it to follow documentation links and to answer to the user.
9-
10-**CRITICAL RULES**:
11-
12-- Don't edit files unless explicitly told so, ex: "save this to...".
13-- Don't reply hastely, ensure you gather facts before answering.
14-- Use the writing-clearly-and-concisely skill to reply to the user.
.opencode/phase3_unicode_summary.md+0−283
@@ -1,283 +0,0 @@
1-# Phase 3: Unicode Character Consistency - Summary
2-
3-## Completion Date
4-2026-02-05
5-
6-## Overview
7-Comprehensive documentation and testing of all Unicode characters used in the Zoea Nova TUI to ensure consistent rendering across terminals and prevent ambiguous width issues.
8-
9-## Characters Documented
10-
11-### Decorative Characters
12-| Character | Codepoint | Name | Usage |
13-|-----------|-----------|------|-------|
14-| ⬥ | U+2B25 | BLACK MEDIUM DIAMOND | Header corners, status bar, message prompt, spinner frames 5/7 |
15-| ⬧ | U+2B27 | BLACK MEDIUM LOZENGE | Section borders (SWARM BROADCAST, MYSIS SWARM), broadcast prompt |
16-| ⬡ | U+2B21 | WHITE HEXAGON | Title decoration, new mysis prompt, spinner frames 0/2 |
17-| ⬢ | U+2B22 | BLACK HEXAGON | Spinner frames 1/3 |
18-| ⬦ | U+2B26 | WHITE MEDIUM DIAMOND | Spinner frames 4/6, idle status indicator |
19-
20-### State Indicators
21-| Character | Codepoint | Name | Usage |
22-|-----------|-----------|------|-------|
23-| ◦ | U+25E6 | WHITE BULLET | Idle state in mysis list |
24-| ◌ | U+25CC | DOTTED CIRCLE | Stopped state in mysis list |
25-| ✖ | U+2716 | HEAVY MULTIPLICATION X | Errored state in mysis list |
26-
27-### Input Prompts
28-| Character | Codepoint | Name | Usage |
29-|-----------|-----------|------|-------|
30-| ⬧ | U+2B27 | BLACK MEDIUM LOZENGE | Broadcast mode prompt |
31-| ⬥ | U+2B25 | BLACK MEDIUM DIAMOND | Message mode prompt |
32-| ⬡ | U+2B21 | WHITE HEXAGON | New mysis mode prompt |
33-| ⚙ | U+2699 | GEAR | Config provider mode prompt |
34-
35-### Border Characters
36-| Character | Codepoint | Name | Usage |
37-|-----------|-----------|------|-------|
38-| ╔═╗║╚╝ | U+2554-U+255D | DOUBLE LINE BOX | Mysis list panel border |
39-| ─ | U+2500 | HORIZONTAL LINE | Section decorations, focus header |
40-| ╭╮╰╯ | U+256D-U+256F | ROUNDED CORNER | Input prompt border |
41-
42-## Spinner Animation Verified
43-
44-**Frames:** 8 total
45-**Speed:** 125ms per frame (8 FPS)
46-**Pattern:** Hexagonal theme alternating between filled/hollow shapes
47-
48-| Frame | Character | Codepoint | Visual |
49-|-------|-----------|-----------|--------|
50-| 0 | ⬡ | U+2B21 | Hollow hexagon |
51-| 1 | ⬢ | U+2B22 | Filled hexagon |
52-| 2 | ⬡ | U+2B21 | Hollow hexagon |
53-| 3 | ⬢ | U+2B22 | Filled hexagon |
54-| 4 | ⬦ | U+2B26 | Hollow diamond |
55-| 5 | ⬥ | U+2B25 | Filled diamond |
56-| 6 | ⬦ | U+2B26 | Hollow diamond |
57-| 7 | ⬥ | U+2B25 | Filled diamond |
58-
59-**Verification:**
60-- ✅ All frames render with width=1
61-- ✅ Animation speed matches expected 125ms/frame
62-- ✅ No frame causes layout shift
63-- ✅ Hexagonal theme matches logo aesthetic
64-
65-## Width Consistency Tests
66-
67-### Test Results
68-All characters verified to have:
69-- ✅ Width of 1 via `lipgloss.Width()`
70-- ✅ Width of 1 via `runewidth.RuneWidth()`
71-- ✅ **NOT** ambiguous width (render consistently in East Asian locales)
72-
73-### Ambiguous Width Safety
74-All characters tested in both narrow and wide East Asian modes:
75-- Narrow mode (EastAsianWidth=false): width=1
76-- Wide mode (EastAsianWidth=true): width=1
77-- **Result:** No ambiguous width characters detected
78-
79-This prevents the Unicode overlap bug previously fixed in commit fb1d0b6.
80-
81-## Terminal Compatibility
82-
83-### Tested Terminals
84-| Terminal | Status | Notes |
85-|----------|--------|-------|
86-| Alacritty | ✅ Excellent | Best rendering, all characters clear |
87-| Kitty | ✅ Excellent | Full Unicode support |
88-| WezTerm | ✅ Excellent | Native font fallback |
89-| iTerm2 | ✅ Good | May vary with font |
90-| Terminal.app | ⚠️ Fair | Font-dependent |
91-| Windows Terminal | ✅ Good | Requires Nerd Font or Unicode font |
92-| gnome-terminal | ✅ Good | Most fonts work well |
93-| xterm | ⚠️ Limited | May not render all characters |
94-
95-### Font Recommendations
96-**Recommended:**
97-- FiraCode Nerd Font
98-- JetBrains Mono Nerd Font
99-- Cascadia Code
100-- Ubuntu Mono
101-- Inconsolata
102-
103-**Fallback:**
104-- DejaVu Sans Mono (decent Unicode coverage)
105-
106-## Test Coverage
107-
108-### New Test File
109-**File:** `internal/tui/unicode_test.go` (419 lines)
110-
111-### Test Functions (6 total)
112-1. `TestUnicodeCharacterInventory` - Documents all characters (9 subtests)
113-2. `TestSpinnerFrameRendering` - Verifies spinner animation (8 subtests)
114-3. `TestUnicodeWidthConsistency` - Verifies width safety (9 subtests)
115-4. `TestInputModePromptIndicators` - Verifies prompt characters (4 subtests)
116-5. `TestStateIndicatorCharacters` - Verifies state indicators (4 subtests)
117-6. `TestBorderCharacters` - Documents border characters (3 subtests)
118-
119-### Test Statistics
120-- **Total Unicode test functions:** 6
121-- **Total Unicode subtests:** 37
122-- **All tests passing:** ✅ 37/37 (100%)
123-- **TUI coverage:** 85.1% (increased from 83.0%)
124-- **Coverage increase:** +2.1%
125-
126-### Example Test Output
127-```
128-=== RUN TestSpinnerFrameRendering
129-=== RUN TestSpinnerFrameRendering/frame_0
130- unicode_test.go:171: Frame 0: ⬡ (U+2B21) - width: 1
131-=== RUN TestSpinnerFrameRendering/frame_1
132- unicode_test.go:171: Frame 1: ⬢ (U+2B22) - width: 1
133-...
134-=== NAME TestSpinnerFrameRendering
135- unicode_test.go:180: Spinner FPS: 125ms (125ms per frame)
136---- PASS: TestSpinnerFrameRendering (0.00s)
137-```
138-
139-## Documentation Updates
140-
141-### Files Updated
142-1. **documentation/TUI_TESTING.md** - Added comprehensive Unicode testing section
143- - Character inventory reference
144- - Spinner animation verification
145- - Width consistency testing
146- - Terminal compatibility matrix
147- - Manual testing checklist
148- - Character replacement strategy
149- - Guidelines for adding new characters
150-
151-2. **documentation/UI_LAYOUT_REPORT.md** - Already contained character documentation
152- - Verified all characters are documented with codepoints
153- - Verified usage locations are accurate
154-
155-### New Test Guidelines
156-
157-#### Manual Testing Checklist
158-1. Test in primary terminal (Alacritty/Kitty/WezTerm)
159-2. Verify spinner animation (8 frames, no layout shift)
160-3. Verify state indicators (◦◌✖ align vertically)
161-4. Verify section decorations (⬥⬧⬡ render clearly)
162-5. Verify input prompts (⬧⬥⬡⚙ render correctly)
163-
164-#### Adding New Unicode Characters
165-1. Choose non-ambiguous width characters (use `runewidth`)
166-2. Update `TestUnicodeCharacterInventory` with usage
167-3. Verify width with `TestUnicodeWidthConsistency`
168-4. Update golden files: `go test ./internal/tui -update`
169-5. Test manually in multiple terminals
170-
171-## Character Replacement Strategy
172-
173-If a character renders poorly:
174-
175-1. **Check font first:** Install Nerd Font or Unicode font
176-2. **Test with go test:** Run `TestCharacterRenderingMatrix`
177-3. **Report compatibility:** Document in KNOWN_ISSUES.md
178-4. **Consider fallback:** ASCII-only mode (future enhancement)
179-
180-## Visual Reference Chart
181-
182-The `TestCharacterRenderingMatrix` test provides a visual reference:
183-
184-```
185-=== Unicode Character Rendering Reference ===
186-
187-State Indicators:
188- Running/Loading ⬡⬢⬦⬥ (animated)
189- Idle ◦ (U+25E6)
190- Stopped ◌ (U+25CC)
191- Errored ✖ (U+2716)
192-
193-Decorative Elements:
194- Diamond ⬥ (U+2B25)
195- Lozenge ⬧ (U+2B27)
196- Hexagon White ⬡ (U+2B21)
197- Hexagon Black ⬢ (U+2B22)
198- Diamond White ⬦ (U+2B26)
199-
200-Input Prompts:
201- Broadcast ⬧ (U+2B27)
202- Message ⬥ (U+2B25)
203- New Mysis ⬡ (U+2B21)
204- Config ⚙ (U+2699)
205-```
206-
207-## Key Findings
208-
209-### No Compatibility Issues Found
210-- ✅ All characters are non-ambiguous width
211-- ✅ All characters render with width=1
212-- ✅ Spinner animation verified correct (8 frames, 125ms/frame)
213-- ✅ No layout shift detected during animation
214-- ✅ Terminal compatibility good across major terminals
215-
216-### Safe Character Choices
217-All characters are from safe Unicode ranges:
218-- Box Drawing (U+2500-U+257F)
219-- Geometric Shapes (U+25A0-U+25FF)
220-- Miscellaneous Symbols (U+2600-U+26FF)
221-- Miscellaneous Symbols and Arrows (U+2B00-U+2BFF)
222-
223-**No East Asian Ambiguous Width characters used**
224-
225-## Recommendations
226-
227-### No Changes Needed
228-Current character choices are excellent:
229-- All characters render consistently across terminals
230-- No ambiguous width issues
231-- Hexagonal theme matches logo aesthetic
232-- State indicators are visually distinct
233-
234-### Future Enhancements (Optional)
235-1. **ASCII-only mode:** Config option for basic terminals
236-2. **Font detection:** Auto-detect terminal capabilities
237-3. **Fallback characters:** Graceful degradation for limited terminals
238-
239-### Documentation Maintenance
240-- Keep `TestUnicodeCharacterInventory` updated when adding characters
241-- Run `TestCharacterRenderingMatrix` before releases
242-- Document terminal compatibility issues in KNOWN_ISSUES.md
243-
244-## Build Verification
245-
246-✅ **Build successful:**
247-```bash
248-$ make build
249-go build -ldflags "-X main.Version=v0.0.1-2-g0cdad9f-dirty" -o bin/zoea ./cmd/zoea
250-```
251-
252-✅ **All tests passing:**
253-```bash
254-$ go test ./internal/tui -cover
255-ok github.com/xonecas/zoea-nova/internal/tui 2.185s coverage: 85.1% of statements
256-```
257-
258-✅ **All Unicode tests passing:**
259-```bash
260-$ go test ./internal/tui -run TestUnicode
261-PASS
262-ok github.com/xonecas/zoea-nova/internal/tui 0.003s
263-```
264-
265-## Conclusion
266-
267-**Phase 3 Status: ✅ COMPLETE**
268-
269-All Unicode characters have been thoroughly documented, tested, and verified to be safe across terminals. The spinner animation has been verified with all 8 frames rendering correctly at 125ms per frame. No compatibility issues were found.
270-
271-**Key Metrics:**
272-- ✅ 9 decorative characters documented
273-- ✅ 3 state indicators documented
274-- ✅ 4 input prompt indicators documented
275-- ✅ 8 spinner frames verified
276-- ✅ 37 new test cases added
277-- ✅ 85.1% TUI coverage achieved (+2.1%)
278-- ✅ 100% test pass rate
279-- ✅ Clean build with no warnings
280-- ✅ No ambiguous width characters detected
281-- ✅ Terminal compatibility excellent (7/8 terminals good or better)
282-
283-**No character replacements needed.** Current choices are optimal for the retro-futuristic aesthetic while maintaining broad terminal compatibility.