Skip to content

API Reference parrot.sdd.techwiki.naming

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.sdd.techwiki.naming

View source

GitHub Wiki page-naming rules and link rewriting.

Attribute FORBIDDEN_NAME_CHARS

Class PageNameError

Raised for a title GitHub would rewrite (literal hyphen) or an empty title.

Attribute UNLINK

Type: object

Function page_href

Return the relative, percent-encoded URL of a wiki page (/wiki/<href> on GitHub).

page_href(name: str) -> str

Parameter Type Default Description
name str A page name from :func:page_name.

Returns: str — The name with every character outside -._~ and the unreserved set percent-encoded, which is how GitHub itself links pages whose names carry —, , or &.

Function page_link

Return a standard Markdown link to a wiki page.

The bundle never emits [[Page Name]] wiki links: GitHub resolves each one against the whole page list at render time, and a sidebar or index carrying hundreds of them fails to render in a wiki with thousands of pages. A plain [text](href) link renders at constant cost.

page_link(name: str, text: str) -> str

Parameter Type Default Description
name str A page name from :func:page_name.
text str Link text shown to the reader.

Returns: str — [text](percent-encoded-name).

Function page_name

Return the GitHub wiki page name with spaces represented by hyphens.

Path separators and the characters in :data:FORBIDDEN_NAME_CHARS (which actions/upload-artifact rejects in a file name) are replaced by a space in the name; the title itself is not changed.

page_name(section: str | None, title: str) -> str

Parameter Type Default Description
section str | None Optional wiki section name.
title str Human-readable page title.

Returns: str — The GitHub Wiki page name.

Raises:

  • PageNameError — If the title is empty or the title or section has a literal hyphen.

Function page_title

Extract frontmatter title, first H1, or a title-cased file stem.

page_title(path: Path, text: str) -> str

Parameter Type Default Description
path Path Markdown path used for the fallback stem.
text str Complete markdown text.

Returns: str — The resolved page title.

Function rewrite_links

Rewrite resolved relative Markdown and ref: links to links to the wiki page.

rewrite_links(text: str, resolver: Callable[[str], str | None | object]) -> str

Parameter Type Default Description
text str Markdown content.
resolver Callable[[str], str | None | object] Maps a relative path or ref:<module> to a wiki page name. None leaves the link untouched (the caller reports it); :data:UNLINK replaces the link by its text alone.

Returns: str — Markdown content with every resolved link converted to [original text](page-href); the author's link text and any #fragment are kept.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally