chore: bootstrap Claude setup

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5.5 committed 2026-10-18 11:37:58 +02:00
1 parent 60388529c1
commit a70aa8b22a
9 files changed
+129 -2

No files matched your search

+1
View File
@@ -0,0 +1 @@
2
+25
View File
@@ -0,0 +1,25 @@
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "f=$(jq -r '.tool_input.file_path // empty'); case \"$f\" in *.py) python3 -m py_compile \"$f\" || exit 2;; esac"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "cd \"$CLAUDE_PROJECT_DIR\" && python3 -m py_compile adif_auth.py adif_client.py query_api.py 1>&2 || exit 2"
}
]
}
]
}
}
+3
View File
@@ -0,0 +1,3 @@
# The code takes no environment variables today.
# ADIF_ACCESS_KEY=
# ADIF_SECRET_KEY=
+18
View File
@@ -0,0 +1,18 @@
name: CI
on:
pull_request:
branches: [development]
push:
branches: [development, main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install requests
# No linter or automated tests exist yet: syntax check only.
- name: Lint (syntax check)
run: python3 -m py_compile adif_auth.py adif_client.py query_api.py
+45
View File
@@ -0,0 +1,45 @@
name: Version
on:
push:
branches: [development, main]
permissions:
contents: write
jobs:
bump:
if: github.actor != 'github-actions[bot]' && !contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version
run: |
set -e
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
[ -f VERSION ] || echo "0.1.0" > VERSION
IFS=. read -r MA MI PA < VERSION
BRANCH="${GITHUB_REF_NAME}"
BUMP=patch
if [ "$BRANCH" = "main" ]; then
# MINOR bump when every new commit already exists on development (PR from development)
git fetch origin development || true
RANGE="${{ github.event.before }}..${{ github.sha }}"
if git rev-parse -q --verify origin/development >/dev/null \
&& [ -n "$(git rev-list $RANGE 2>/dev/null)" ] \
&& [ -z "$(git rev-list $RANGE --not origin/development 2>/dev/null | grep -v "^$(git rev-parse HEAD)$" || true)" ]; then
BUMP=minor
fi
fi
if [ "$BUMP" = minor ]; then MI=$((MI+1)); PA=0; else PA=$((PA+1)); fi
NEW="$MA.$MI.$PA"
echo "$NEW" > VERSION
git add VERSION
git commit -m "chore(release): v$NEW [skip ci]"
git push origin "HEAD:$BRANCH"
if [ "$BRANCH" = "main" ]; then
git fetch origin development || exit 0
git checkout -B development origin/development
git merge origin/main -m "chore(release): merge main v$NEW [skip ci]"
git push origin development
fi
-2
View File
@@ -21,5 +21,3 @@ ENV/
*.tmp
.temp
.cache/
.claude/
CLAUDE.md
+31
View File
@@ -0,0 +1,31 @@
# ADIF API reverse engineering
## Overview
Python client for the ADIF "El Cano Móvil" API, reverse-engineered from the Android APK. Implements the HMAC-SHA256 request signing and 9 endpoints. Research project; keys come from the public APK.
## Commands
- Dev/demo: `python3 adif_client.py`; `python3 query_api.py`
- Install: `pip install requests`
- Lint: `python3 -m py_compile adif_auth.py adif_client.py query_api.py` (no linter configured)
- Test: none automated. Files in `tests/` are live-API scripts (network, credentials); run manually, not in CI.
- Build: none
## Architecture
- `adif_auth.py`: request signing (`AdifAuthenticator`)
- `adif_client.py`: high-level `AdifClient`
- `query_api.py`: CLI querying helper
- `docs/`: API, auth algorithm and endpoint analysis
- `apk_decompiled/`, `apk_extracted/`, `adif.apk`: reverse-engineering sources; do not edit
## Conventions
Type-hinted Python 3 with `from __future__ import annotations`; `requests` for HTTP.
## Workflow quirks
No `development` branch yet; branch from `main` until created.
## Deployment
None (library/research scripts).
## Gotchas
- `tests/` hit the real ADIF API; failures may be network or API changes, not code.
- Large binary/decompiled dirs: avoid broad greps; scope to the `.py` files and `docs/`.
+5
View File
@@ -0,0 +1,5 @@
# Lessons
Recurring mistakes and how to avoid them. Add an entry when a mistake repeats.
- `.gitignore` used to exclude `.claude/` and `CLAUDE.md`; keep them tracked.
+1
View File
@@ -0,0 +1 @@
0.1.0