Search

PythonReactSEOPDF
GitHub Skill

patternscomposite

Composite Pattern pattern for C development

mgreenly☆ 1 Repository stars0 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

Composite Pattern

Compose objects into tree structures. Individual objects and compositions treated uniformly through common interface.

ikigai Application

Layer system: Layers (scrollback, separator, input, spinner) compose into layer stack. Each implements same render interface:

typedef struct {
    void (*render)(void *layer, ik_render_ctx_t *render);
    void (*resize)(void *layer, int width, int height);
} ik_layer_vtable_t;

Rendering: REPL iterates layers, calls render on each. Doesn't care if layer is simple or composite.

Future uses:

  • Nested UI components
  • Tool result trees
  • Message threading/nesting

Benefit: Add new layer types without changing render loop.

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-01-20
Index updated
2026-01-26
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!