Fuzzy component discovery over the shipped manifest —python -m chirp_ui find.
Sprint 6 of the agent-grounding-depth epic. The manifest is the registry projection; this module turns it into a one-liner for humans and agents who know what they want but not the exact BEM block name.
Search model
A component matches a query when the query is a case-insensitive substring of any of:
name— the manifest key, e.g.metric-cardblock— the BEM block, e.g.metric-card(usually same as name)category— e.g.data-display,feedbackdescription— the{#- chirp-ui: ... -#}doc-block text
Query filters (--categoryetc.) are applied AFTER substring match, so
find --category=feedbacklists every component in that category even when
no term is given.
Use--authoring=preferredto list the registry-blessed primitives agents
should reach for first, or--authoring=compatibilityto audit legacy
helpers retained for existing templates.
Use--maturity=experimentalto inspect public surfaces still going through
pre-1.0 stabilization, or--maturity=stableto list normal public
vocabulary.
Use--role=patternto inspect recipe-first or pattern-like surfaces without
mixing them into primitive/component searches.
Output
Default output is one line per hit, stable/sorted::
{name:<30} {category:<16} {first-line-of-description}
Use--detailsto include the registry metadata agents need when choosing a
surface: role, maturity, authoring, macro, template, runtime requirements, and
slots.
Exit code0always (including zero hits) — this is discovery, not
validation.
Seedocs/plans/PLAN-agent-grounding-depth.md § Sprint 6.
find
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Return manifest component entries with the given authoring hint.
This is the Python API twin ofpython -m chirp_ui find --authoring=.... It returns…
Return components marked as preferred authoring vocabulary.
Return compatibility components retained for existing or narrow uses.
Return manifest component entries with the given maturity label.
Return manifest component entries with the given role label.
Return(name, category, summary)rows sorted by name.
Return detailed registry rows sorted by name.
Format rows as an aligned three-column table (no header).
Format detailed rows as an aligned table with a header.
components_by_authoring
function
preferred_components
function
def preferred_components(*, manifest: Manifest | None = None, category: str | None = None) -> dict[str, ComponentEntry]
Return components marked as preferred authoring vocabulary.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
manifest
|
Manifest | None
|
None
|
|
category
|
str | None
|
None
|
compatibility_components
function
def compatibility_components(*, manifest: Manifest | None = None, category: str | None = None) -> dict[str, ComponentEntry]
Return compatibility components retained for existing or narrow uses.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
manifest
|
Manifest | None
|
None
|
|
category
|
str | None
|
None
|
components_by_maturity
function
def components_by_maturity(maturity: str, *, manifest: Manifest | None = None, category: str | None = None, authoring: str | None = None) -> dict[str, ComponentEntry]
Return manifest component entries with the given maturity label.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
maturity
|
str
|
— | |
manifest
|
Manifest | None
|
None
|
|
category
|
str | None
|
None
|
|
authoring
|
str | None
|
None
|
components_by_role
function
def components_by_role(role: str, *, manifest: Manifest | None = None, category: str | None = None, maturity: str | None = None, authoring: str | None = None) -> dict[str, ComponentEntry]
Return manifest component entries with the given role label.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
role
|
str
|
— | |
manifest
|
Manifest | None
|
None
|
|
category
|
str | None
|
None
|
|
maturity
|
str | None
|
None
|
|
authoring
|
str | None
|
None
|
search
function
def search(manifest: Manifest, query: str = '', *, category: str | None = None, authoring: str | None = None, maturity: str | None = None, role: str | None = None) -> list[SearchRow]
Return(name, category, summary)rows sorted by name.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
manifest
|
Manifest
|
— | |
query
|
str
|
''
|
|
category
|
str | None
|
None
|
|
authoring
|
str | None
|
None
|
|
maturity
|
str | None
|
None
|
|
role
|
str | None
|
None
|
detailed_search
function
def detailed_search(manifest: Manifest, query: str = '', *, category: str | None = None, authoring: str | None = None, maturity: str | None = None, role: str | None = None) -> list[DetailedSearchRow]
Return detailed registry rows sorted by name.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
manifest
|
Manifest
|
— | |
query
|
str
|
''
|
|
category
|
str | None
|
None
|
|
authoring
|
str | None
|
None
|
|
maturity
|
str | None
|
None
|
|
role
|
str | None
|
None
|
format_rows
function
def format_rows(rows: Iterable[SearchRow]) -> str
Format rows as an aligned three-column table (no header).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
rows
|
Iterable[SearchRow]
|
— |
format_detailed_rows
function
def format_detailed_rows(rows: Iterable[DetailedSearchRow]) -> str
Format detailed rows as an aligned table with a header.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
rows
|
Iterable[DetailedSearchRow]
|
— |
main
function
def main(argv: list[str] | None = None) -> int
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
argv
|
list[str] | None
|
None
|
View source · /home/runner/work/chirp-ui/chirp-ui/site/../src/chirp_ui/find.py:1