fabricatio-digest
Converts a natural-language requirement into a validated, executable TaskList with role awareness and dependency sequencing.
Installation
pip install fabricatio[digest]
Overview
fabricatio-digest takes a raw requirement string together with a set of registered roles and uses an LLM-backed proposal pipeline to generate a structured TaskList. The resulting task list is executable — each task carries the context and description injected during generation, and hook callbacks can be attached for pre/post-execution behavior.
Key Classes
Digest (mixin capability)
Extends Propose. Inherit this to add requirement-to-tasklist generation to a role.
from fabricatio_digest.capabilities.digest import Digest
class PlannerRole(SomeBaseRole, Digest):
"""A role that can break down requirements into task lists."""
pass
task_list = await planner.digest(
requirement="Summarize all PRs from the last week and post to Slack.",
receptions={RoleName("reviewer"), RoleName("notifier")},
)
| Method | Description |
|---|---|
digest(requirement, receptions, **kwargs) |
Renders a template with the requirement and role metadata, then calls propose(TaskList, ...). Returns Optional[TaskList]. |
TaskList
Pydantic model representing a sequence of tasks that aim to satisfy an ultimate_target.
| Field / Method | Description |
|---|---|
ultimate_target: str |
The overarching goal of the task list. |
tasks: List[Task] |
Ordered list of Task objects from fabricatio-core. |
parallel: bool |
If True, tasks are executed concurrently. |
add_before_exec_hook(hook) |
Register a callback to run before each task. |
add_after_exec_hook(hook) |
Register a callback to run after each task. |
inject_context(**kwargs) |
Merge keyword arguments into every task's initial context. |
inject_description(desc: str) |
Append extra text to every task's description. |
execute(parallel=None) |
Run the task sequence, respecting hooks and the parallel flag. |
explain() |
Render a human-readable explanation via template. |
Configuration
All options below are read through the fabricatio configuration chain (see the
Configuration Guide). Set them under the
[ext.digest] table in fabricatio.toml, equivalently under
[tool.fabricatio.ext.digest] in pyproject.toml, or via
FABRICATIO_EXT__DIGEST__<FIELD_UPPER> environment variables.
[ext.digest]
digest_template = "built-in/digest"
task_list_explain_template = "built-in/task_list_explain"
| Option | Type | Default | Description |
|---|---|---|---|
digest_template |
str |
"built-in/digest" |
Template name for digest |
task_list_explain_template |
str |
"built-in/task_list_explain" |
Template name for task list explain. |
Access at runtime: from fabricatio_digest.config import digest_config.
Dependencies
fabricatio-core— core interfaces, template manager, andPropose/Taskbase classes.
License
MIT — see LICENSE
Metadata
Release files for fabricatio-digest 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fabricatio_digest-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / fabricatio_digest-0.3.3-py3-none-any.whl
| Download URL | fabricatio_digest-0.3.3-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fb26fa773333a0f94829a4bfe97c07e9182c0f9df3f2d773ac7126c3a12bf38
|
|
BLAKE2b-256 checksum How to use checksums |
efd1d1065b75be22a4f0f2f57a6a8816d14c3e320b76fb29eecad95413cf6700
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|