Skip to content

Commit 6c19619

Browse files
fixed README.md:38:3: MD036: Emphasis possibly used instead of a heading element
1 parent c9ce827 commit 6c19619

14 files changed

Lines changed: 560 additions & 43 deletions

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ body:
4646
- Shell:
4747
validations:
4848
required: true
49-

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ body:
3333
label: Constraints / Environment
3434
validations:
3535
required: false
36-

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ Design decisions, tradeoffs, and known limitations.
4141
## Documentation
4242
- [ ] README updated
4343
- [ ] Runbook updated (if applicable)
44-

.github/workflows/ci.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
pre-commit:
13+
name: Pre-commit Checks
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.11"
24+
25+
- name: Install pre-commit
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pre-commit
29+
30+
- name: Run pre-commit (fast path)
31+
id: precommit_fast
32+
run: |
33+
pre-commit run --all-files
34+
35+
- name: Generate pre-commit log (only on failure)
36+
if: failure() && steps.precommit_fast.outcome == 'failure'
37+
run: |
38+
chmod +x scripts/run-precommit.sh
39+
./scripts/run-precommit.sh
40+
41+
- name: Upload pre-commit log artifact (only on failure)
42+
if: failure() && steps.precommit_fast.outcome == 'failure'
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: pre-commit-log
46+
path: artifacts/pre-commit.log
47+
48+
tests:
49+
name: Unit Tests
50+
runs-on: ubuntu-latest
51+
needs: [pre-commit]
52+
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Set up Python
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: "3.11"
61+
62+
- name: Install dependencies
63+
run: |
64+
python -m pip install --upgrade pip
65+
66+
# Install repo dependencies if present
67+
if [ -f requirements.txt ]; then
68+
pip install -r requirements.txt
69+
fi
70+
if [ -f requirements-dev.txt ]; then
71+
pip install -r requirements-dev.txt
72+
fi
73+
74+
# Only install pytest if tests exist
75+
if [ -d tests ]; then
76+
pip install pytest
77+
fi
78+
79+
- name: Run pytest (if tests exist)
80+
run: |
81+
if [ -d tests ]; then
82+
pytest -q
83+
else
84+
echo "No tests/ directory found; skipping pytest."
85+
fi

.github/workflows/ci.yml

Whitespace-only changes.

.gitignore

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
###############################################################################
2+
# AI Automation Template - .gitignore
3+
#
4+
# This file follows the standards defined in docs/ai/CONTEXT.md
5+
# Secrets, runtime artifacts, and generated files must never be committed.
6+
###############################################################################
7+
8+
# ---------------------------------------------------------------------------
9+
# Environment variables / secrets
10+
# ---------------------------------------------------------------------------
11+
12+
# Standard environment files
13+
.env
14+
.env.*
15+
!.env.example
16+
17+
# Alternative env naming (supported, but discouraged in favor of .env)
18+
vars.env
19+
vars.env.*
20+
!vars.env.example
21+
22+
# Generic secrets
23+
secrets.*
24+
*.secret
25+
*.secrets
26+
27+
# Credential files
28+
*.pem
29+
*.key
30+
*.crt
31+
*.pfx
32+
*.p12
33+
id_rsa
34+
id_ed25519
35+
36+
# Cloud / tooling credentials
37+
.aws/
38+
.gcp/
39+
.azure/
40+
terraform.tfvars
41+
terraform.tfvars.json
42+
43+
# ---------------------------------------------------------------------------
44+
# Python
45+
# ---------------------------------------------------------------------------
46+
47+
__pycache__/
48+
*.py[cod]
49+
*.pyo
50+
*.egg-info/
51+
.eggs/
52+
.venv/
53+
venv/
54+
.env-venv/
55+
56+
# ---------------------------------------------------------------------------
57+
# Pre-commit / tooling artifacts
58+
# ---------------------------------------------------------------------------
59+
60+
# Local pre-commit caches (never commit)
61+
.pre-commit-cache/
62+
.precommit/
63+
64+
# AI / lint / CI artifacts (generated)
65+
artifacts/
66+
*.log
67+
68+
# ---------------------------------------------------------------------------
69+
# OS / editor noise
70+
# ---------------------------------------------------------------------------
71+
72+
.DS_Store
73+
Thumbs.db
74+
75+
.vscode/
76+
.idea/
77+
*.swp
78+
*.swo
79+
80+
# ---------------------------------------------------------------------------
81+
# Build / runtime output
82+
# ---------------------------------------------------------------------------
83+
84+
dist/
85+
build/
86+
out/
87+
coverage/

.pre-commit-config.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
repos:
2+
# Basic repository hygiene and safety checks
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v5.0.0
5+
hooks:
6+
- id: check-merge-conflict
7+
- id: check-yaml
8+
- id: check-json
9+
- id: end-of-file-fixer
10+
- id: trailing-whitespace
11+
- id: mixed-line-ending
12+
args: [--fix=lf]
13+
- id: detect-private-key
14+
15+
# Python: Ruff (lint + autofix) and Ruff formatter
16+
- repo: https://github.com/astral-sh/ruff-pre-commit
17+
rev: v0.8.4
18+
hooks:
19+
- id: ruff
20+
args: [--fix]
21+
- id: ruff-format
22+
23+
# Bash: ShellCheck
24+
- repo: https://github.com/shellcheck-py/shellcheck-py
25+
rev: v0.10.0.1
26+
hooks:
27+
- id: shellcheck
28+
29+
# Bash: shfmt (format shell scripts)
30+
- repo: https://github.com/scop/pre-commit-shfmt
31+
rev: v3.8.0-1
32+
hooks:
33+
- id: shfmt
34+
args:
35+
- -w
36+
- -i
37+
- "2"
38+
- -ci
39+
- -sr
40+
41+
# Markdown: PyMarkdown (Python-based; avoids nodeenv/Node)
42+
- repo: https://github.com/jackdewinter/pymarkdown
43+
rev: v0.9.25
44+
hooks:
45+
- id: pymarkdown
46+
args: ["--config", ".pymarkdown.json", "scan"]
47+
exclude: ^\.github/pull_request_template\.md$
48+
49+
50+
default_language_version:
51+
python: python3

.pymarkdown.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"plugins": {
3+
"md013": {
4+
"enabled": true,
5+
"line_length": 120
6+
},
7+
"md041": {
8+
"enabled": false
9+
},
10+
"md022": {
11+
"enabled": true
12+
},
13+
"md032": {
14+
"enabled": true
15+
}
16+
}
17+
}

README.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,90 @@
1+
12
# AI Automation Template
23

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.
55

66
## How to Use This Template
7+
78
1. Click **Use this template**
89
2. Create a new repository
910
3. Populate `docs/requirements.md`
1011
4. Use AI tools (Cursor, ChatGPT) anchored to `docs/ai/CONTEXT.md`
1112

1213
## Key Files
14+
1315
- `docs/ai/CONTEXT.md` – AI behavior standards
1416
- `docs/requirements.md` – Behavioral contract
1517
- `.github/*` – Workflow and governance enforcement
1618

1719
## AI Usage Pattern
20+
1821
Always instruct AI tools to:
22+
1923
- Follow `docs/ai/CONTEXT.md`
2024
- Implement `docs/requirements.md`
2125
- Update documentation
2226
- Ensure CI passes
2327

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

bootstrap-template-structure.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ done
5151

5252
echo
5353
echo "==> Bootstrap complete"
54-

0 commit comments

Comments
 (0)