brynhild-development

mandersogit's avatarfrom mandersogit

Guidelines for contributing to brynhild itself - use when making changes to the brynhild codebase, running tests, or understanding project conventions

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 9, 2025

When & Why to Use This Skill

The Brynhild Development skill is a specialized project-local guide designed to streamline contributions to the Brynhild codebase. It acts as an intelligent documentation assistant that provides instant access to project architecture, environment setup, testing protocols, and strict coding conventions. By automating the retrieval of development standards, it ensures high code quality and consistency for both new and existing contributors.

Use Cases

  • Onboarding new contributors by providing an immediate overview of the project structure and mandatory virtual environment configurations.
  • Standardizing the development workflow through guided execution of tests, type checking (mypy/pyright), and linting (ruff) using project-specific commands.
  • Enforcing architectural integrity by reminding developers of specific coding styles, such as qualified import requirements and internal vs. external symbol naming.
  • Managing version control workflows by providing guidelines for Git commits and utilizing project-specific commit helpers.
  • Serving as a template for creating other project-local skills to capture unique organizational knowledge and development practices.
namebrynhild-development
descriptionGuidelines for contributing to brynhild itself - use when making changes to the brynhild codebase, running tests, or understanding project conventions

Brynhild Development

This is a project-local skill demonstrating how to create skills specific to a project. It provides guidance for contributing to brynhild.

Project Structure

brynhild/
├── src/brynhild/          # Main package
│   ├── api/               # LLM provider implementations
│   ├── cli/               # Command-line interface
│   ├── config/            # Settings and configuration
│   ├── core/              # Core conversation logic
│   ├── hooks/             # Hook system
│   ├── builtin_skills/    # Skills shipped with package
│   ├── plugins/           # Plugin system
│   ├── profiles/          # Model profiles
│   ├── session/           # Session management
│   ├── skills/            # Skill discovery and loading
│   ├── tools/             # Tool implementations
│   └── ui/                # TUI application
├── tests/                 # Test suite
├── scripts/               # Development scripts
├── workflow/              # Development documentation
└── .brynhild/skills/      # Project-local skills (like this one)

Python Environment

Always use the project venv:

./local.venv/bin/python script.py
./local.venv/bin/pip install package

Never use system Python or bare python3.

Running Tests

# All tests
make tests

# Specific test file
./local.venv/bin/python -m pytest tests/path/test_file.py -v

# Specific test
./local.venv/bin/python -m pytest tests/path/test_file.py::test_name -v

Type Checking

# mypy (primary)
make typecheck

# pyright (alternative)
make typecheck-pyright

Linting

make lint

Uses ruff for linting. Auto-fix with:

./local.venv/bin/python -m ruff check --fix src/ tests/

Import Style

Qualified imports only. Never import symbols directly.

# ✅ CORRECT
import pathlib as _pathlib
import typing as _typing
import brynhild.config as config

# ❌ WRONG
from pathlib import Path
from brynhild.config import Settings

External imports: underscore prefix (_pathlib, _click) Internal imports: no underscore (config, session)

Git Commits

Never make autonomous commits. Use the commit-helper skill to create commit plans, then wait for user authorization to execute.

Testing Policy

  • All tests must be honest (no mocking away the behavior being tested)
  • No trivial tests (must verify meaningful behavior)
  • No hacky workarounds; use # noqa for intentional lint ignores

This Skill is an Example

This skill demonstrates:

  • Project-local skills in .brynhild/skills/
  • Overriding or extending builtin skills
  • Project-specific conventions and guidelines

Users of brynhild can create similar skills for their own projects.