Skip to content

Commit 11d83fa

Browse files
Jammy2211claude
authored andcommitted
Add AI agent configs, contributing guide, and issue templates
- CLAUDE.md, AGENTS.md, .github/copilot-instructions.md for AI agent support - CONTRIBUTING.md with AI-first workflow explanation and code example guidance - Issue templates for feature requests and bug reports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9026b18 commit 11d83fa

6 files changed

Lines changed: 259 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or unexpected behaviour
4+
title: 'fix: '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
<!-- Clear description of the bug -->
12+
13+
## Steps to Reproduce
14+
15+
1.
16+
2.
17+
3.
18+
19+
## Expected Behaviour
20+
21+
<!-- What should happen -->
22+
23+
## Actual Behaviour
24+
25+
<!-- What actually happens -->
26+
27+
## Environment
28+
29+
- OS:
30+
- Python version:
31+
- Package version:
32+
33+
## Original Prompt
34+
35+
<details>
36+
<summary>Click to expand starting prompt</summary>
37+
38+
<!-- If this issue was created from an AI prompt, paste the original prompt here -->
39+
40+
</details>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Feature / Task Request
3+
about: Propose a new feature, improvement, or task
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Overview
10+
11+
<!-- 2-4 sentence summary of what this task is and why it matters -->
12+
13+
## Plan
14+
15+
<!-- High-level bullet-point plan, human readable, no code -->
16+
17+
<details>
18+
<summary>Detailed implementation plan</summary>
19+
20+
### Affected Repositories
21+
<!-- List repos this touches, mark primary -->
22+
23+
### Implementation Steps
24+
<!-- Step-by-step with file paths and specifics -->
25+
26+
### Key Files
27+
<!-- List files that will be modified -->
28+
29+
</details>
30+
31+
## Example Code
32+
33+
<!-- If your feature involves a specific calculation, algorithm, or small piece of functionality,
34+
include example code here. Even a rough script, a working prototype, or a snippet showing
35+
the existing behaviour you want changed helps enormously.
36+
37+
Code gives AI agents and human contributors concrete context and dramatically reduces
38+
misunderstandings. Delete this section if not applicable. -->
39+
40+
```python
41+
# Paste your example code here
42+
```
43+
44+
## Original Prompt
45+
46+
<details>
47+
<summary>Click to expand starting prompt</summary>
48+
49+
<!-- If this issue was created from an AI prompt, paste the original prompt here -->
50+
51+
</details>

.github/copilot-instructions.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copilot Coding Agent Instructions
2+
3+
You are working on **PyAutoConf**, the configuration management library for the PyAuto ecosystem.
4+
5+
## Key Rules
6+
7+
- Run tests after every change: `python -m pytest test_autoconf/`
8+
- All files must use Unix line endings (LF, `\n`)
9+
- If changing public API (function signatures, class names, import paths), clearly document what changed in your PR description — all downstream PyAuto packages depend on this
10+
11+
## Architecture
12+
13+
- `autoconf/conf.py` — Core configuration system
14+
- `autoconf/dictable.py` — Dictionary/serialization support
15+
- `autoconf/fitsable.py` — FITS file handling
16+
- `autoconf/json_prior/` — JSON-based configuration priors
17+
- `autoconf/tools/` — Utility decorators and helpers
18+
- `test_autoconf/` — Test suite
19+
20+
## Sandboxed runs
21+
22+
```bash
23+
NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autoconf/
24+
```

AGENTS.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# PyAutoConf — Agent Instructions
2+
3+
**PyAutoConf** is the configuration management library for the PyAuto ecosystem. It handles object serialization/deserialization, JSON-based priors, and configuration generation.
4+
5+
## Setup
6+
7+
```bash
8+
pip install -e ".[dev]"
9+
```
10+
11+
## Running Tests
12+
13+
```bash
14+
python -m pytest test_autoconf/
15+
```
16+
17+
### Sandboxed / Codex runs
18+
19+
```bash
20+
NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autoconf/
21+
```
22+
23+
## Key Architecture
24+
25+
- `autoconf/conf.py` — Core configuration system
26+
- `autoconf/dictable.py` — Dictionary/serialization support for YAML
27+
- `autoconf/fitsable.py` — FITS file handling
28+
- `autoconf/json_prior/` — JSON-based configuration priors
29+
- `autoconf/tools/` — Utility decorators and helpers
30+
- `autoconf/mock/` — Mock objects for testing
31+
32+
## Key Rules
33+
34+
- All files must use Unix line endings (LF)
35+
- If changing public API, note it in your PR description — all downstream PyAuto packages depend on this
36+
37+
## Working on Issues
38+
39+
1. Read the issue description and any linked plan.
40+
2. Identify affected files and write your changes.
41+
3. Run the full test suite: `python -m pytest test_autoconf/`
42+
4. Ensure all tests pass before opening a PR.
43+
5. If changing public API, clearly document what changed — PyAutoFit, PyAutoArray, PyAutoGalaxy, and PyAutoLens all depend on this package.

CLAUDE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PyAutoConf
2+
3+
**PyAutoConf** is the configuration management library for the PyAuto ecosystem. It handles object serialization/deserialization via YAML, JSON-based priors and configuration generation, and provides utility tools for scientific Python applications.
4+
5+
- Package name: `autoconf`
6+
- Requires Python >= 3.9
7+
8+
## Repository Structure
9+
10+
- `autoconf/` — Main package
11+
- `conf.py` — Core configuration system
12+
- `dictable.py` — Dictionary/serialization support
13+
- `fitsable.py` — FITS file handling
14+
- `json_prior/` — JSON-based configuration priors
15+
- `tools/` — Utility decorators and helpers
16+
- `mock/` — Mock objects for testing
17+
- `test_autoconf/` — Test suite (pytest)
18+
19+
## Commands
20+
21+
### Install
22+
```bash
23+
pip install -e ".[dev]"
24+
```
25+
26+
### Run Tests
27+
```bash
28+
python -m pytest test_autoconf/
29+
python -m pytest test_autoconf/ -s
30+
```
31+
32+
### Codex / sandboxed runs
33+
34+
When running Python from Codex or any restricted environment, set writable cache directories:
35+
36+
```bash
37+
NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autoconf/
38+
```
39+
40+
## Line Endings — Always Unix (LF)
41+
42+
All files **must use Unix line endings (LF, `\n`)**. Never write `\r\n` line endings.

CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# AI-Assisted Development
2+
3+
This project uses an AI-first development workflow. Most features, bug fixes, and improvements are implemented through AI coding agents (Claude Code, GitHub Copilot, OpenAI Codex) working from structured issue descriptions.
4+
5+
## How It Works
6+
7+
1. **Issues are the starting point** — Every task begins as a GitHub issue with a structured format: an overview, a human-readable plan, a detailed implementation plan (in a collapsible block), and optionally the original prompt that generated the issue.
8+
9+
2. **AI agents pick up issues** — Issues can be assigned to AI coding agents (e.g. GitHub Copilot) which read the issue description, `AGENTS.md`, and `CLAUDE.md` for context, then implement the changes autonomously.
10+
11+
3. **Human review** — All AI-generated pull requests are reviewed by maintainers before merging.
12+
13+
## Creating an Issue
14+
15+
When opening an issue, please use the provided issue templates. The **Feature / Task Request** template follows our standard format:
16+
17+
- **Overview** — What and why, in 2-4 sentences
18+
- **Plan** — High-level bullet points (human-readable)
19+
- **Detailed implementation plan** — File paths, steps, key files (in a collapsible block)
20+
- **Original Prompt** — If you used an AI to help draft the issue, include the original prompt
21+
22+
If your feature involves a specific calculation, algorithm, or small piece of functionality — **include example code**. Even a rough script, a working prototype, or a snippet showing the existing behaviour you want to change makes a huge difference. Code examples give AI agents and human contributors concrete context to work from, and dramatically reduce misunderstandings about what you're asking for.
23+
24+
This structure ensures that both human contributors and AI agents can understand and act on the issue effectively.
25+
26+
## Contributing Without AI
27+
28+
Traditional contributions are equally welcome! If you prefer to work without AI tools, simply follow the development setup and pull request guidelines below. The issue templates are helpful for any contributor, AI or human.
29+
30+
---
31+
32+
# Contributing
33+
34+
Contributions are welcome and greatly appreciated!
35+
36+
## Getting Started
37+
38+
1. Install from source:
39+
```
40+
pip install -e ".[dev]"
41+
```
42+
43+
2. Create a feature branch:
44+
```
45+
git checkout -b feature/name-of-your-branch
46+
```
47+
48+
3. Make your changes and run tests:
49+
```
50+
python -m pytest test_autoconf/
51+
```
52+
53+
4. Commit, push, and submit a pull request.
54+
55+
### Pull Request Guidelines
56+
57+
1. The pull request should include tests for new functionality.
58+
2. If the pull request adds functionality, update docs accordingly.
59+
3. If changing public API, clearly document what changed — downstream packages depend on this.

0 commit comments

Comments
 (0)