chore: add hooks, CI/CD infrastructure, ignore runtime JSON

- Transfer Claude Code hooks from internal: identity injector, email
  notification, auto-fix diagnostics, pre-compact recovery
- Add notification sounds for tool use, stop, and alerts
- Wire all hooks in .claude/settings.json
- Add global system prompt (.aipass/aipass_global_prompt.md)
- Add branch-local prompt placeholders for all modules
- Set up CI pipeline: lint (ruff) → test matrix (3.10-3.13) → coverage
- Add workflows: PyPI publish, security scanning, stale issues
- Add GitHub issue templates, dependabot, editorconfig
- Configure pytest norecursedirs and coverage fail-under=70
- Add *.json to gitignore — runtime JSON files constantly change
- Untrack runtime JSON (registry, plans, seed bypass, module data)
- Keep source JSON tracked via negation rules (json_templates, pack,
  spawn templates, settings, pyrightconfig)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AIOSAI
2026-03-06 20:33:40 -08:00
co-authored by Claude Opus 4.6
parent 6f60b7e26e
commit f30443504c
63 changed files with 1189 additions and 679 deletions
+90
View File
@@ -0,0 +1,90 @@
name: Bug Report
description: Report a bug or unexpected behavior
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug. Please fill out the sections below so we can reproduce and fix the issue.
- type: checkboxes
id: checklist
attributes:
label: Pre-submission checklist
options:
- label: I searched existing issues and didn't find a duplicate
required: true
- label: I verified this happens with the latest version
required: true
- label: I can reproduce this bug consistently
required: true
- type: textarea
id: description
attributes:
label: Description
description: A clear description of the bug.
placeholder: "Describe what happened and what you expected to happen..."
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Step-by-step instructions to reproduce the bug.
placeholder: |
1. Install aipass v2.x.x
2. Run `aipass ...`
3. Observe error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen?
- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened instead?
- type: textarea
id: reproduction
attributes:
label: Minimal Reproducible Example
description: Provide the smallest amount of code that reproduces the bug.
placeholder: |
from aipass import ...
# minimal code to trigger the bug
render: python
- type: textarea
id: error
attributes:
label: Full Error Output / Stack Trace
description: Copy the complete error output, including the full stack trace.
render: shell
- type: textarea
id: environment
attributes:
label: Environment
description: Your environment details.
placeholder: |
- Python: 3.12.0
- OS: Ubuntu 24.04
- aipass: 2.1.69
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Context
description: Anything else we should know? Screenshots, logs, related issues, etc.
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Questions & Discussions
url: https://github.com/AIOSAI/AIPass/discussions
about: Ask questions, share ideas, and discuss AIPass here
@@ -0,0 +1,39 @@
name: Feature Request
description: Suggest a new feature or improvement
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature! Please fill out the sections below.
- type: textarea
id: problem
attributes:
label: Problem Statement
description: What problem does this feature solve? Why is it needed?
placeholder: "Currently there is no way to ..."
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed Solution
description: How would you solve this? Describe your ideal implementation.
placeholder: "Add a new command / API / config option that ..."
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: What other approaches did you think about? Why were they ruled out?
- type: textarea
id: additional
attributes:
label: Additional Context
description: Examples, diagrams, mockups, links to similar features in other projects, etc.
+24
View File
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
open-pull-requests-limit: 5
commit-message:
prefix: "deps"
prefix-development: "deps"
include: "scope"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "ci"
open-pull-requests-limit: 5
commit-message:
prefix: "ci"
include: "scope"
+38 -15
View File
@@ -7,27 +7,50 @@ on:
branches: [main]
jobs:
test:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install ruff
- run: ruff check src/ tests/
- run: ruff format --check src/ tests/
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
test:
needs: lint
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
- run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- run: coverage run -m pytest -v --tb=short --rootdir=.
- run: coverage report --fail-under=70
- name: Lint
run: ruff check src/ tests/
- name: Test
run: pytest
coverage:
name: coverage
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- run: coverage run -m pytest --rootdir=.
- run: coverage xml
- uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false
+34
View File
@@ -0,0 +1,34 @@
name: Publish to PyPI
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install build
- run: python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish:
needs: build
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
+33
View File
@@ -0,0 +1,33 @@
name: Security Scan
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 6 * * 1"
jobs:
dependency-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install pip-audit
- run: pip install -e .
- name: Pip audit
run: pip-audit --skip-editable
codeql:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: python
- uses: github/codeql-action/analyze@v3
+17
View File
@@ -0,0 +1,17 @@
name: Stale Issues
on:
schedule:
- cron: "0 0 * * 1"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: "This issue has been inactive for 30 days. It will be closed in 7 days if no further activity occurs."
days-before-stale: 30
days-before-close: 7
stale-issue-label: "stale"
exempt-issue-labels: "pinned,security,high-priority"