Skip to content

skill · phase: implementation

AI-Assisted Action Authoring

Purpose

Help the user create lifecycle actions from natural language descriptions. Translate intent into a concrete, validated .aidlc/actions.yaml entry.

Instructions

  1. Receive the description. The user provides a natural language description of the automation they want (e.g., "create a log file every time we finish a feature").

  2. Infer the lifecycle event. Map the described trigger to one of:

    • on-instance-start — when a lifecycle instance is created
    • on-phase-enter — when entering a specific phase
    • on-phase-exit — when exiting a specific phase
    • on-instance-complete — when all phases are done
    • on-artifact-created — when a lifecycle artifact is produced

    If the trigger cannot be mapped, list all available events and ask the user to select one.

  3. Compose the action declaration. Determine:

    • event: The lifecycle event from step 2
    • phase_filter (optional): Which phase(s) this applies to
    • action: A built-in action name (git-branch, github-issue, doc-update) or a custom shell command
    • blocking: true if the transition should halt on failure, false otherwise
    • description: Preserve the user's original natural language intent
  4. Present for confirmation. Show the user:

    - event: <event>
      action: <command or built-in>
      blocking: <true|false>
      description: "<original intent>"
    

    Ask: "Does this look correct? Confirm to save, or describe changes."

  5. Validate. Before saving, validate the entry against the actions.yaml schema.

  6. Save. On confirmation + valid schema, append the entry to .aidlc/actions.yaml.

  7. Offer dry-run. After saving, offer to test-fire the action with a sample event payload (no real transition occurs).

Security Confirmation

If the generated command references sensitive operations:

  • File deletion (rm, del)
  • Infrastructure changes (terraform, aws, kubectl)
  • Permission modifications (chmod, chown, IAM changes)

You MUST:

  1. Warn the user that this action will execute automatically on the lifecycle event
  2. Explain what the command does and what it affects
  3. Require explicit confirmation that the user accepts the automated execution
  4. If declined, do NOT save the entry — actions.yaml remains untouched

Error Handling

  • If the user declines confirmation: do not write anything, report that the action was not saved
  • If schema validation fails: display the violation, do not save, suggest corrections
  • If the description is too ambiguous to infer an event: list events and prompt selection

Exit Criteria

  • Action entry saved to .aidlc/actions.yaml (on confirmation) OR
  • User explicitly declined (no file changes made)
  • Dry-run offered after successful save