|
| 1 | +<!--- |
| 2 | + Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + or more contributor license agreements. See the NOTICE file |
| 4 | + distributed with this work for additional information |
| 5 | + regarding copyright ownership. The ASF licenses this file |
| 6 | + to you under the Apache License, Version 2.0 (the |
| 7 | + "License"); you may not use this file except in compliance |
| 8 | + with the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, |
| 13 | + software distributed under the License is distributed on an |
| 14 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + KIND, either express or implied. See the License for the |
| 16 | + specific language governing permissions and limitations |
| 17 | + under the License. |
| 18 | +--> |
| 19 | + |
| 20 | +# Agent Instructions |
| 21 | + |
| 22 | +This project uses AI agent skills stored in `.ai/skills/`. Each skill is a directory containing a `SKILL.md` file with instructions for performing a specific task. |
| 23 | + |
| 24 | +Skills follow the [Agent Skills](https://agentskills.io) open standard. Each skill directory contains: |
| 25 | + |
| 26 | +- `SKILL.md` — The skill definition with YAML frontmatter (name, description, argument-hint) and detailed instructions. |
| 27 | +- Additional supporting files as needed. |
| 28 | + |
| 29 | +## Python Function Docstrings |
| 30 | + |
| 31 | +Every Python function must include a docstring with usage examples. |
| 32 | + |
| 33 | +- **Examples are required**: Each function needs at least one doctest-style example |
| 34 | + demonstrating basic usage. |
| 35 | +- **Optional parameters**: If a function has optional parameters, include separate |
| 36 | + examples that show usage both without and with the optional arguments. Pass |
| 37 | + optional arguments using their keyword name (e.g., `step=dfn.lit(3)`) so readers |
| 38 | + can immediately see which parameter is being demonstrated. |
| 39 | +- **Reuse input data**: Use the same input data across examples wherever possible. |
| 40 | + The examples should demonstrate how different optional arguments change the output |
| 41 | + for the same input, making the effect of each option easy to understand. |
| 42 | +- **Alias functions**: Functions that are simple aliases (e.g., `list_sort` aliasing |
| 43 | + `array_sort`) only need a one-line description and a `See Also` reference to the |
| 44 | + primary function. They do not need their own examples. |
| 45 | + |
| 46 | +## Aggregate and Window Function Documentation |
| 47 | + |
| 48 | +When adding or updating an aggregate or window function, ensure the corresponding |
| 49 | +site documentation is kept in sync: |
| 50 | + |
| 51 | +- **Aggregations**: `docs/source/user-guide/common-operations/aggregations.rst` — |
| 52 | + add new aggregate functions to the "Aggregate Functions" list and include usage |
| 53 | + examples if appropriate. |
| 54 | +- **Window functions**: `docs/source/user-guide/common-operations/windows.rst` — |
| 55 | + add new window functions to the "Available Functions" list and include usage |
| 56 | + examples if appropriate. |
0 commit comments