==================
Attribute Literal Values
==================

@invariant
@deterministic
@archivist(evidence: ["https://example.com/spec"], confidence: 0.95, metadata: {source: "design"})
fn no_secrets(slice) -> bool {
  return true
}

---

(source_file
  (attributed_declaration
    (attribute
      name: (identifier))
    (attribute
      name: (identifier))
    (attribute
      name: (identifier)
      (attribute_arg
        name: (identifier)
        value: (list_literal
          (string_literal
            (string_delimiter)
            (string_content)
            (string_delimiter))))
      (attribute_arg
        name: (identifier)
        value: (float_literal))
      (attribute_arg
        name: (identifier)
        value: (dict_literal
          (dict_entry
            key: (identifier)
            value: (string_literal
              (string_delimiter)
              (string_content)
              (string_delimiter))))))
    (fn_declaration
      name: (identifier)
      (parameter_list
        (typed_parameter
          name: (identifier)))
      (type_annotation
        (identifier))
      body: (block
        (return_statement
          (true))))))

==================
Retry Attribute Name
==================

@job("scan")
@retry(max: 3, backoff: "linear")
fn scan() -> bool {
  return true
}

---

(source_file
  (attributed_declaration
    (attribute
      name: (identifier)
      (attribute_arg
        (string_literal
          (string_delimiter)
          (string_content)
          (string_delimiter))))
    (attribute
      name: (identifier)
      (attribute_arg
        name: (identifier)
        value: (integer_literal))
      (attribute_arg
        name: (identifier)
        value: (string_literal
          (string_delimiter)
          (string_content)
          (string_delimiter))))
    (fn_declaration
      name: (identifier)
      (type_annotation
        (identifier))
      body: (block
        (return_statement
          (true))))))

==================
Attribute Path And Call Sentinels
==================

@trigger(github.check_failed)
@schedule(every: schedule("*/30 * * * *"))
fn merge_captain(ctx) -> string {
  return "ok"
}

---

(source_file
  (attributed_declaration
    (attribute
      name: (identifier)
      (attribute_arg
        (attribute_path
          (identifier)
          (identifier))))
    (attribute
      name: (identifier)
      (attribute_arg
        name: (identifier)
        value: (attribute_call
          (identifier)
          (attribute_arg
            (string_literal
              (string_delimiter)
              (string_content)
              (string_delimiter))))))
    (fn_declaration
      name: (identifier)
      (parameter_list
        (typed_parameter
          name: (identifier)))
      (type_annotation
        (identifier))
      body: (block
        (return_statement
          (string_literal
            (string_delimiter)
            (string_content)
            (string_delimiter)))))))

==================
Attributed Tool And Skill
==================

@capability("workspace.read")
tool inspect(path: string) -> string {
  description "Inspect a file"
}

@persona("release")
skill release {
  description "Release workflow"
}

---

(source_file
  (attributed_declaration
    (attribute
      name: (identifier)
      (attribute_arg
        (string_literal
          (string_delimiter)
          (string_content)
          (string_delimiter))))
    (tool_declaration
      name: (identifier)
      (parameter_list
        (typed_parameter
          name: (identifier)
          type: (type_annotation
            (identifier))))
      (type_annotation
        (identifier))
      (tool_description
        (string_literal
          (string_delimiter)
          (string_content)
          (string_delimiter)))))
  (attributed_declaration
    (attribute
      name: (identifier)
      (attribute_arg
        (string_literal
          (string_delimiter)
          (string_content)
          (string_delimiter))))
    (skill_declaration
      name: (identifier)
      field_name: (identifier)
      field_value: (string_literal
        (string_delimiter)
        (string_content)
        (string_delimiter)))))
