Files
voculinux/AGENTS.md
T
Jatin K MalikandGitHub b501235f1e feat(web): redesign marketing site with workstation craft (#582)
* feat(web): deslop marketing site with workstation craft identity

Replace generic AI SaaS landing patterns with a deliberate Linux desk
utility look: cool paper palette, Bricolage + Source Sans, solid type,
editorial feature rows, and terminal install as first-class proof.

Adds PRODUCT.md, DESIGN.md, and WEB-DESLOP-NOTES.md. Drops unused geist
and react-intersection-observer. No product claim changes.

* chore(web): drop local deslop working notes from PR

WEB-DESLOP-NOTES.md was a firstmate/session artifact, not product docs.

* fix(web): stop mobile horizontal overflow and harden viewport layout

Long install URLs expanded the page past the phone width. Constrain
terminal pre with break-all, min-w-0 columns, and overflow-x clip.
Tighten mobile hero type and full-width CTAs. Add Playwright viewport
QA script and jest checks that assert no overflow at desktop/tablet/mobile.

* refactor(web): drop browser speech preview from marketing home

Remove the cloud SpeechRecognition demo section and nav Demo link.
Keep product truth: hero install, features, screenshots, engines.
Fold shortcut/engine/audio links into the features intro.
Delete unused LiveDemo component and its unit test.

* chore(web): remove orphaned demo overlay and double-press hook

Only LiveDemo used these; gone with the browser preview section.

* feat(web): borrow PR #546 craft language into deslop home

Merge closed redesign language onto feat/web-deslop-craft: pure white
and near-black iron surfaces, emerald-committed palette, asymmetric
hero with real app screenshots, full-bleed install strip, feature bento
with tray/settings shots, and install-to-dictation steps.

Keep Bricolage + Source Sans (not Geist), no browser speech demo, and
mobile overflow guards. Update screenshots homepage expectations.

* docs(design): align DESIGN.md tokens with PR #546 iron/emerald palette

* fix(web): drop settings screenshot from installer details

Uninstall sat too far below the list once the general-settings shot
was in that column. Keep checklist, requirements, and uninstall only.

* fix(web): raise light-mode primary and footer contrast

Darken light emerald so white button text hits ~5:1 (was 3.4).
Brighten install-strip and footer secondary text for legibility.
Verified light/dark × desktop/tablet/mobile with no overflow.

* fix(web): compact feature cards to kill empty vertical space

Right-column tiles were h-full + justify-between next to a tall
screenshot, so short copy left large voids. Use content-height cards
with denser padding and inline link rows instead.

* fix(web): pair settings shot with full feature rail

Replace three orphan cards beside a tall dialog with a six-row
feature panel that stretches with the screenshot frame. Crop the
settings image with object-cover/object-top so heights match and
no void sits next to the UI shot.

* feat(web): apply homepage craft language to SEO child pages

Rewrite SeoSubpageShell chrome (fixed nav, install pill, iron footer)
to match the deslop home. Add subpage utilities and retoken all
templated child routes: borders, radii, mono kickers, single emerald
accent, terminal panels, no rainbow icon tiles or gradient cards.

* fix(web): avoid invalid @apply hover:border-primary/40 in subpage-card

* fix(web): rewrite subpage CSS without invalid Tailwind @apply

* fix(web): color comparison X icons rose-red on alternatives

Use soft rose (#c45c5c / #e08b8b) for no/cons marks so they read as
distinct from emerald yes/checks without looking like form errors.

* docs(web): move product/design docs under web/ and drop impeccable markers

Keep PRODUCT.md and DESIGN.md next to the Next app (not repo root), add
web/AGENTS.md as the entry point, and point the root AGENTS website
section at those files. Strip tool-specific schema comments.

* fix(web): use icon-only copy control on install terminal

Replace the chunky Copy/Copied chip with a quiet clipboard icon that
turns into a check on success.

* fix(web): restyle system requirements as a spec rail

Replace the nested bullet card with mono-label / value pairs under the
installer section so it matches the craft language used elsewhere.

* fix(web): center engine rows and quiet the Default badge

Align name/badge with multi-line engine details on sm+; replace the
filled green pill with a small mono outline chip.
2026-07-24 01:15:45 -07:00

6.3 KiB

AGENTS.md - Vocalinux

Guidelines for AI agents working on this codebase.

Project Overview

Vocalinux is a voice dictation system for Linux. It uses:

  • Python 3.9+ for the main application
  • GTK 3 (via PyGObject) for the desktop UI and system tray
  • whisper.cpp (default), OpenAI Whisper, and Vosk for speech recognition
  • Next.js/TypeScript for the website (in web/)

Key Dependencies

  • pywhispercpp - Python bindings for whisper.cpp (default engine)
  • vosk - Lightweight speech recognition
  • pyaudio - Audio capture
  • PyGObject - GTK integration
  • psutil - Process utilities (required by pywhispercpp)

Build & Test Commands

Python

# Install in development mode
./install.sh --dev
# Or manually:
pip install -e ".[dev]"

# Run all tests
pytest

# Run a single test file
pytest tests/test_command_processor.py

# Run a single test function
pytest tests/test_command_processor.py::TestCommandProcessor::test_initialization

# Run tests with verbose output
pytest -v

# Run tests with coverage
pytest --cov=src --cov-report=html

# Run tests excluding slow/integration tests
pytest -m "not slow"
pytest -m "not integration"

# Lint (check only)
make lint
# Or manually:
flake8 src/ tests/ --select=E9,F63,F7,F82
black --check --diff src/ tests/
isort --check-only --diff --profile black src/ tests/

# Auto-format code
make format
# Or manually:
black src/ tests/
isort --profile black src/ tests/

# Type checking
make typecheck
# Or: mypy src/

# Run the application
vocalinux --debug
# Or from source: python -m vocalinux.main --debug

Website (Next.js)

Website-specific agent notes, product truth, and design system live under web/:

  • web/AGENTS.md — commands and layout map
  • web/PRODUCT.md — product claims / audience for the site
  • web/DESIGN.md — visual system for marketing UI
cd web
npm install
npm run dev      # Development server
npm run build    # Production build
npm run lint     # ESLint
npm run test     # Jest tests

Code Style Guidelines

Formatting

  • Line length: 100 characters
  • Formatter: Black
  • Import sorter: isort (black-compatible profile)
  • Linter: flake8

Import Order

Use isort with black profile. Imports should be grouped:

  1. Standard library (import os, from typing import ...)
  2. Third-party packages (import gi, from vosk import Model)
  3. Local imports (from vocalinux.common_types import ...)

Type Hints

Use type hints for all function signatures. Use Protocol for interfaces (see common_types.py).

Naming Conventions

  • Classes: PascalCase (e.g., CommandProcessor, ConfigManager)
  • Functions/methods: snake_case (e.g., process_text, load_config)
  • Constants: UPPER_SNAKE_CASE (e.g., CONFIG_DIR, DEFAULT_CONFIG)
  • Private methods: _leading_underscore (e.g., _compile_patterns)
  • Module-level logger: logger = logging.getLogger(__name__)

Docstrings

Use triple-quoted docstrings for modules, classes, and public functions:

"""Configuration manager for Vocalinux."""

class ConfigManager:
    """Manager for user configuration settings."""

    def load_config(self):
        """Load configuration from the config file."""

Error Handling

Use specific exception types, log errors with context:

try:
    with open(CONFIG_FILE, "r") as f:
        user_config = json.load(f)
except json.JSONDecodeError as e:
    logger.error(f"Invalid JSON in config file: {e}")

Logging

Each module should have its own logger:

import logging
logger = logging.getLogger(__name__)

Testing Guidelines

  • Place tests in tests/ directory
  • Name test files as test_*.py, functions as test_*
  • Use unittest.TestCase or plain pytest functions
  • Use pytest-mock for mocking (via mocker fixture)

Test Markers

@pytest.mark.slow          # Long-running tests
@pytest.mark.integration   # Integration tests
@pytest.mark.audio         # Requires audio hardware

Project Structure

src/vocalinux/
├── main.py                    # Application entry point
├── version.py                 # Version info
├── common_types.py            # Shared types/enums/protocols
├── speech_recognition/
│   ├── recognition_manager.py # VOSK/Whisper/whisper.cpp management
│   └── command_processor.py   # Voice command processing
├── text_injection/
│   └── text_injector.py       # X11/Wayland text injection
├── ui/
│   ├── tray_indicator.py      # System tray icon
│   ├── settings_dialog.py     # Settings GUI
│   ├── config_manager.py      # Configuration handling
│   └── keyboard_backends/     # Keyboard input handling
└── utils/
    ├── resource_manager.py    # Resource utilities
    ├── whispercpp_model_info.py   # whisper.cpp model metadata & hardware detection
    └── vosk_model_info.py         # VOSK model metadata

Release Process

See docs/RELEASE_PROCESS.md for detailed release instructions.

Quick summary:

  1. Update version in src/vocalinux/version.py
  2. Update version references in README.md, docs/INSTALL.md, docs/UPDATE.md
  3. Update web/src/app/page.tsx and web/package.json
  4. Run make lint to verify code quality
  5. Create branch release/vX.Y.Z-PHASE
  6. Commit with chore(release): prepare vX.Y.Z-PHASE
  7. Push and create PR
  8. After merge, create and push tag: git tag -a vX.Y.Z-PHASE -m "Release X.Y.Z-PHASE"
  9. GitHub Actions will build and publish automatically

Commit Message Format

Follow Conventional Commits:

type(scope): short description

Longer description if needed.

Fixes #123

Types: feat, fix, docs, style, refactor, test, chore

Examples:

feat(commands): add "select all" voice command
fix(tray): resolve icon not updating on Wayland
docs(readme): update installation instructions

Branch Naming

  • feature/ - New features
  • fix/ - Bug fixes
  • docs/ - Documentation updates
  • refactor/ - Code refactoring
  • test/ - Test additions/updates
  • release/ - Release preparation (e.g., release/v0.7.0-beta)

Important Rules

  • Never push directly to main - Always create a branch and PR
  • All changes require a PR - Even small fixes and documentation updates
  • Wait for CI to pass before merging PRs
  • Squash merge PRs to keep history clean