pynydus.standards.agents_md¶
AGENTS.md standard: validate, extract, generate.
Generates a per-egg deployment runbook from egg data.
Module Contents¶
Functions¶
Validate the egg’s per-egg AGENTS.md structural completeness. |
|
Check which required sections are present in the markdown. |
|
Extract the per-egg AGENTS.md from the egg. |
|
Generate a per-egg AGENTS.md deployment runbook. |
|
Build a deployment runbook from egg data using a deterministic template. |
API¶
- pynydus.standards.agents_md.validate(egg: pynydus.api.schemas.Egg, schema: dict[str, Any] | None = None) list[pynydus.api.schemas.ValidationIssue]¶
Validate the egg’s per-egg AGENTS.md structural completeness.
Checks that required sections (Prerequisites, Hatch) are present, and that optional sections exist when the egg has relevant data.
Args: egg: The Egg to validate. schema: Optional JSON Schema dict. When
None, the schema is loaded from the bundledagentsspec.Returns: List of validation issues (empty if valid or if
agents_mdis absent).
- pynydus.standards.agents_md._parse_sections(text: str) dict[str, Any]¶
Check which required sections are present in the markdown.
- pynydus.standards.agents_md.extract(egg: pynydus.api.schemas.Egg) dict[str, str]¶
Extract the per-egg AGENTS.md from the egg.
Args: egg: The Egg that may contain passthrough AGENTS.md content.
Returns:
{"AGENTS.md": <content>}or empty dict if absent.
- pynydus.standards.agents_md.generate(egg: pynydus.api.schemas.Egg, *, llm_fn: Any = None) dict[str, str]¶
Generate a per-egg AGENTS.md deployment runbook.
If the egg already has one, returns it unchanged. Otherwise builds one from a template, with optional LLM polish.
Args: egg: Source egg. llm_fn: Optional callable
(draft: str) -> strthat polishes the template output via LLM. WhenNone, the template is returned as-is.Returns:
{"AGENTS.md": <content>}.
- pynydus.standards.agents_md._build_template(egg: pynydus.api.schemas.Egg) str¶
Build a deployment runbook from egg data using a deterministic template.