Guidelines

104 documents

Language

Dependency Injection

Constructor injection via `Microsoft.Extensions.DependencyInjection`. Use interface types for dependencies, not concr...

Naming

- `PascalCase` for types, methods, properties, public fields, constants, namespaces

Nullable Reference Types

Enable `<Nullable>enable</Nullable>` in all projects. Treat warnings as design signals — `string` means non-null, `st...

Font Scaling

Layouts MUST NOT break at 2x font size. Check `Configuration.fontScale` and test with large font settings enabled.

Dashboard service is display-only

The dashboard service is a generic API and UI layer. It has no knowledge of git, files, or roadmap structure. Agents ...

Database

Use SQLite with WAL mode for concurrent read access. No ORM — use direct SQL via the `sqlite3` standard library module.

python

Deterministic IDs

Always use the roadmap file's own UUID from its YAML frontmatter. Never generate random UUIDs. IDs must be determinis...

File paths

Use `pathlib.Path`, not `os.path`. All path manipulation should go through `pathlib`.

python

No external dependencies in core libraries

`roadmap_lib` uses the standard library only. Do not add PyYAML, requests, or other third-party packages to core libr...

Shell scripts

Shell script `main()` functions must only call other functions — no inline logic. Keep scripts composable and testable.

Type hints

Type hints are welcome but not required. Maintain Python 3.9 compatibility — use `from __future__ import annotations`...

python

Use roadmap_lib

Use functions from `roadmap_lib` for all roadmap operations (reading state, parsing frontmatter, finding steps, etc.)...

Web services

Use Flask for web services. The dashboard service runs on Flask with a REST API and SSE/polling for live updates.

pythonweb

YAML frontmatter

Parse YAML frontmatter with the built-in frontmatter parser in `roadmap_lib`. Do not add a PyYAML dependency. The par...

Dynamic Type

Layouts MUST NOT break at larger text sizes. Use Dynamic Type throughout — avoid fixed font sizes. Custom fonts must ...

Use AppKit and UIKit, not SwiftUI

Use AppKit (macOS) and UIKit (iOS) for all UI. Use SwiftUI only where Apple requires it.

iosmacos

Networking

Platform

Architecture

Use MVVM with [CommunityToolkit.Mvvm](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/) — source-gener...

Design-Time Data

- Use `d:DataContext` and `d:DesignInstance` for XAML designer preview data

csharpwindows

Fluent Design

Use built-in WinUI 3 controls — they implement Fluent 2 natively. Never custom-draw what a standard control can do.

csharpwindows

High DPI / Display Scaling

XAML layout uses effective pixels (epx) — scaling is automatic for all XAML-rendered content.

csharpwindows

MSIX Packaging

- Use the single-project MSIX packaging model

windows

Theming

WinUI 3 supports tri-state theming: Light, Dark, and High Contrast.

csharpwindows

Background tasks

Apps that sync data, process uploads, or maintain state SHOULD use platform background execution APIs rather than relying on foreground presence.

iosmacosandroidwindowsweb

Deep linking

All significant feature points and views MUST be deep linkable using the platform's native URL/deep link mechanism:

kotlinswifttypescriptwebwindows

Handoff and continuity

Apps available on multiple devices SHOULD support continuity features so users can start work on one device and resume on another.

iosmacosandroidweb

Notifications

Apps SHOULD use the platform notification system for timely, actionable alerts that respect user preferences.

iosmacosandroidwindowsweb

Scriptable and automatable

Components and flows SHOULD be scriptable where the platform supports it:

csharpioskotlinmacosswiftwebwindows

Search integration

App content SHOULD be discoverable through the platform's system search, enabling users to find content without opening the app.

iosmacosandroidwindowsweb

Share and inter-app data flow

Apps SHOULD participate in the platform's share and inter-app data exchange mechanisms to integrate with other apps and workflows.

iosmacosandroidwindowsweb

Widgets and glanceable surfaces

Apps with time-sensitive or frequently checked data SHOULD provide widgets and glanceable surfaces on platforms that support them.

iosmacosandroidweb

Security

Skills And Agents

Testing

Comprehensive unit testing

Prioritize unit tests over integration tests. Test state transitions, edge cases, serialization round-trips. Every im...

csharppythontypescript

Flaky Test Prevention

Flaky tests destroy confidence. Quarantine them immediately — fix or delete, never ignore.

typescriptweb

Mutation Testing

Mutation testing validates that your tests actually catch bugs — not just achieve coverage.

csharpkotlinpythonswifttypescript

Post-generation verification

Every generated artifact MUST be verified:

ioskotlintypescript

Properties of Good Tests

From Kent Beck's Test Desiderata — tests should be:

Property-Based Testing

When to use: parsers, serializers, data transformers, encoders/decoders, validators — anything

csharpkotlinpythonswifttypescript

References

1. [Google SWE Book Ch. 11: Testing Overview](https://abseil.io/resources/swe-book/html/ch11.html)

typescriptweb

Security Testing

Run security scans as part of post-generation verification (agentic-cookbook://guidelines/testing/post-generation-verification). These a...

csharpkotlinpythonswifttypescriptweb

Test Data

**Construct what you need, per test.** Large shared fixture files SHOULD be avoided.

Test Doubles

Use [Martin Fowler's taxonomy](https://martinfowler.com/bliki/TestDouble.html):

csharpkotlinpythonswifttypescriptweb

Test Pyramid

Projects SHOULD follow the Google SWE Book ratio: **80% unit / 15% integration / 5% E2E**.

The Testing Workflow

The recommended Claude Code testing workflow, combining all tools:

pythonswifttypescriptweb

Unit Test Patterns

**Structure — Arrange, Act, Assert (AAA):**

Ui

Always show progress

When the UI is waiting on an async task:

Animation & Motion

Motion should be purposeful — guide attention, show spatial relationships, and provide

windows

Color

Use color with intention — never as the sole means of conveying information.

typescriptwebwindows

Data Display

Choose the right pattern for the content type and user task.

Feedback Patterns

Every user action should have visible feedback. The weight of the feedback should match

Form Design

Forms are where users do real work. Reduce friction at every step.

web

Iconography

Icons supplement text — they do not replace it (except for universally understood symbols

windows

Layout

Design for the content, not a fixed screen size. Layouts should adapt gracefully from

typescriptwebwindows

Platform Design Languages

Defer to these canonical sources before applying the defaults in this file:

kotlinwebwindows

Previews

All UI components MUST include preview declarations for rapid visual verification during development. Previews should...

kotlinswift

Spacing

Use a consistent spatial scale based on a **4px base unit** (8px primary grid). All spacing,

windows

State Design

Every view that loads data or can be empty must handle all four states explicitly. Never

typescriptweb

Touch & Click Targets

Interactive elements MUST be large enough to tap or click accurately. Defer to the platform

ioskotlintypescriptwebwindows

Typography

Use the platform's system font. Establish a type scale with clear roles — don't invent

ioskotlinmacostypescriptwebwindows

Visual Hierarchy

Establish clear importance through size, weight, color, and spacing. Every screen should

windows