This project automates the process of generating, running, parsing, and applying Ailly prompt outputs to an AWS DocGen project. It combines all steps into one streamlined command using a single Python script.
This tool:
- Generates Ailly prompts from DocGen snippets.
- Runs Ailly CLI to get enhanced metadata.
- Parses Ailly responses into structured JSON.
- Updates your DocGen examples with the new metadata.
All of this is done with one command.
- Python 3.8+
- Node.js and npm (for
npx) - A DocGen project directory
From your project root, run:
python -m aws_doc_sdk_examples_tools.agent.bin.main \
/path/to/your/docgen/project \
--system-prompts path/to/system_prompt.txtiam_tributary_root: Path to the root directory of your IAM policy tributary--system-prompts: List of system prompt files or strings to include in the Ailly configuration--skip-generation: Skip the prompt generation and Ailly execution steps (useful for reprocessing existing outputs)
Run python -m aws_doc_sdk_examples_tools.agent.bin.main update --help for more info.
Under the hood, this script:
-
Creates a directory
.ailly_iam_policycontaining:- One Markdown file per snippet.
- A
.aillyrcconfiguration file.
-
Runs
npx @ailly/clito generate.ailly.mdoutputs. -
Parses the Ailly
.ailly.mdfiles into a singleiam_updates.jsonfile. -
Updates each matching
Examplein the DocGen instance with:titletitle_abbrevsynopsis
python -m aws_doc_sdk_examples_tools.agent.bin.main \
~/projects/AWSIAMPolicyExampleReservoir \
--system-prompts prompts/system_prompt.txtThis will:
- Write prompts and config to
.ailly_iam_policy/ - Run Ailly and capture results
- Parse and save output as
.ailly_iam_policy/iam_updates.json - Apply updates to your DocGen examples