Design feature

From janekbaraniewski/openusage · View interactive version

Design feature is an AI agent skill from the GitHub repository janekbaraniewski/openusage. Design new features for OpenUsage with structured design docs and implementation tasks. Triggers for any change touching 3+ subsystems, or when explicitly invoked.

How to use this skill

Skill file

OpenUsage Feature Designer

Invocation: When a user asks to design, plan, or architect a feature — OR when a proposed change touches 3+ subsystems (core, providers, TUI, config, detect, daemon, telemetry).


Phase 0 — Quiz (MANDATORY)

Before any design work, gather answers to ALL of these. Research the codebase yourself if the user doesn't know.

  1. What problem does this solve? One sentence. What's broken or missing today?
  2. Who benefits? End users, contributors, or both?
  3. What subsystems are affected? List from: core types, providers, TUI, config, detect, daemon, telemetry, CLI commands.
  4. What's explicitly out of scope? Name at least one thing this feature does NOT do.
  5. Are there existing design docs that overlap? Check docs/*.md for related designs. If overlap exists, ask the user whether to extend or create new.
  6. What's the simplest version that delivers value? Identify the MVP slice.
  7. Does this change any public interfaces? (UsageProvider, UsageSnapshot, AccountConfig, config JSON schema)
  8. Backward compatibility concerns? Will existing configs, stored data, or provider behavior break?

Phase 1 — Explore (MANDATORY)

Read these before designing. Skip only if already in context:

  1. Core types: internal/core/types.go, internal/core/provider_spec.go, internal/core/widget.go
  2. Affected subsystems: Read the primary files for each subsystem from Q3.
  3. Existing design docs: Read any overlapping docs from docs/.
  4. Related providers: If the feature changes provider behavior, read at least one provider of each affected pattern (header probing, rich API, local files, CLI).
  5. Config schema: internal/config/config.go + configs/example_settings.json

After reading, summarize findings that affect the design. Don't just list files — state what you learned.


Phase 2 — Design

Write the design doc to docs/<FEATURE_NAME>_DESIGN.md. Use the template in references/design-template.md.

Design principles for this project

What NOT to do


Phase 3 — Implementation Tasks

After the design doc is written, break it into implementation tasks. Each task should be:

Format each task as:

### Task N: <title>
Files: <list of files to create or modify>
Depends on: <task numbers or "none">
Description: <what to do, 2-4 sentences>
Tests: <what tests to write>

After all tasks, add a dependency summary showing which tasks can run in parallel:

### Dependency Graph
- Task 1, 2: sequential (foundational types and config)
- Tasks 3, 4, 5: parallel group (all depend on 1-2, independent of each other)
- Task 6: depends on 3, 4
- Task 7: depends on all (integration verification)

This helps the implementer (/implement-feature) launch parallel agents for independent tasks, significantly reducing implementation time.

Task design tips

Append tasks to the design doc under a ## Implementation Tasks section.


Checklist

Before finishing:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.