|
| 1 | + |
1 | 2 | # AI Automation Template |
2 | 3 |
|
3 | | -This repository is a GitHub Template used to create |
4 | | -AI-assisted automation projects with consistent standards. |
| 4 | +This repository is a GitHub Template used to create AI-assisted automation projects with consistent standards. |
5 | 5 |
|
6 | 6 | ## How to Use This Template |
| 7 | + |
7 | 8 | 1. Click **Use this template** |
8 | 9 | 2. Create a new repository |
9 | 10 | 3. Populate `docs/requirements.md` |
10 | 11 | 4. Use AI tools (Cursor, ChatGPT) anchored to `docs/ai/CONTEXT.md` |
11 | 12 |
|
12 | 13 | ## Key Files |
| 14 | + |
13 | 15 | - `docs/ai/CONTEXT.md` – AI behavior standards |
14 | 16 | - `docs/requirements.md` – Behavioral contract |
15 | 17 | - `.github/*` – Workflow and governance enforcement |
16 | 18 |
|
17 | 19 | ## AI Usage Pattern |
| 20 | + |
18 | 21 | Always instruct AI tools to: |
| 22 | + |
19 | 23 | - Follow `docs/ai/CONTEXT.md` |
20 | 24 | - Implement `docs/requirements.md` |
21 | 25 | - Update documentation |
22 | 26 | - Ensure CI passes |
23 | 27 |
|
| 28 | +## Configuration, Secrets, and `.gitignore` |
| 29 | + |
| 30 | +This repository uses a strict `.gitignore` policy to prevent secrets, runtime |
| 31 | +state, and generated artifacts from being committed. |
| 32 | + |
| 33 | +All contributors and AI tools must follow the standards defined in |
| 34 | +`docs/ai/CONTEXT.md`. |
| 35 | + |
| 36 | +### Environment Variables and Secrets |
| 37 | + |
| 38 | +- Never commit secrets or environment-specific configuration |
| 39 | +- Local configuration must be stored in `.env` or equivalent files |
| 40 | +- Example files **must** be committed to document required variables |
| 41 | + |
| 42 | +| File | Purpose | Committed | |
| 43 | +|----|--------|----------| |
| 44 | +| `.env` | Local runtime secrets | ❌ No | |
| 45 | +| `.env.example` | Example/template for variables | ✅ Yes | |
| 46 | +| `vars.env` | Alternative env file (discouraged) | ❌ No | |
| 47 | +| `vars.env.example` | Example alternative | ✅ Yes | |
| 48 | + |
| 49 | +If additional environment files are required (e.g. `.env.prod`), |
| 50 | +they must remain uncommitted and be documented. |
| 51 | + |
| 52 | +### Generated Files and Artifacts |
| 53 | + |
| 54 | +The following are intentionally excluded from version control: |
| 55 | + |
| 56 | +- Pre-commit and lint artifacts |
| 57 | +- AI-generated logs |
| 58 | +- Build and runtime output |
| 59 | +- Virtual environments and caches |
| 60 | + |
| 61 | +These files may be generated locally or in CI, but must never be committed. |
| 62 | + |
| 63 | +### Why This Matters |
| 64 | + |
| 65 | +- Prevents accidental secret disclosure |
| 66 | +- Keeps the repository portable and clean |
| 67 | +- Ensures consistent behavior across environments |
| 68 | +- Allows AI tools to safely operate without leaking sensitive data |
| 69 | + |
| 70 | +If you believe a file should be committed but is currently ignored, |
| 71 | +update `.gitignore` deliberately and document the rationale. |
| 72 | + |
| 73 | +## Pre-commit Checks and Log Review |
| 74 | + |
| 75 | +This repository uses **pre-commit** to enforce formatting, linting, and safety |
| 76 | +standards before changes are committed and merged. |
| 77 | + |
| 78 | +### How Pre-commit Is Run |
| 79 | + |
| 80 | +Pre-commit checks may run in two ways: |
| 81 | + |
| 82 | +1. **Automatically during `git commit`** |
| 83 | + If pre-commit is installed locally, checks run automatically and may block |
| 84 | + the commit until issues are resolved. |
| 85 | + |
| 86 | +2. **Manually via the helper script (recommended)** |
| 87 | + For full visibility and AI-assisted workflows, use: |
| 88 | + |
| 89 | + ```bash |
| 90 | + ./scripts/run-precommit.sh |
0 commit comments