Skip to content

How-to

Make a custom template

Start from a built-in template and change it — add a document to a step, or add a whole new step.

What you'll do

Write a template of your own in .aidlc/templates/, built on a template AIDLC already ships. You name the parent with extends:, then say only what is different. First you add a document to a step that already exists. Then you add a new step.

Steps

  1. Pick the parent. See the templates you can build on:

    aidlc templates list
    

    The examples below build on quick-feature, which runs requirements, design, implementation, testing and deployment.

  2. Add a document to a step that already exists, with override:. Save this as .aidlc/templates/feature-with-runbook.yaml:

    name: feature-with-runbook
    description: quick-feature, plus a runbook before release.
    extends: quick-feature
    scope: standard
    override:
      deployment:
        required_artifacts:
          - name: deployment-record.md
          - name: runbook.md
    

    override: replaces the step's whole document list. So list the documents the step already needs, then the new one. Leave deployment-record.md out and deployment stops asking for it.

  3. Add a new step, with add:. Save this as .aidlc/templates/feature-with-security-review.yaml:

    name: feature-with-security-review
    description: quick-feature, plus a security review after testing.
    extends: quick-feature
    scope: standard
    add:
      - after: testing
        phase:
          name: security-review
          required_artifacts:
            - name: security-review.md
    

    The new step sits under phase:, with its own name and required_artifacts. Use before: instead of after: to put it earlier. To drop a step from the parent, list it under remove:.

  4. Start work with your template:

    aidlc start feature-with-security-review --name <instance>
    

A template with extends: does not read its own phases: list. Leave phases: out, or write phases: []. If you get the shape wrong, AIDLC skips the template and prints one warning: failed to load template line that shows what to write instead.

Check it worked

Run aidlc templates show feature-with-security-review. You should see security-review listed between testing and deployment. Run aidlc templates show feature-with-runbook. Deployment should list both deployment-record.md and runbook.md.