docs: apply fleet-template (16-artifact scaffold)
Some checks are pending
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / security (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / license (push) Waiting to run
CI / ai-review (push) Waiting to run

Adds missing standard artifacts:
- README.md (if missing)
- AGENTS.md (AI agent contract)
- PLAN.md (current sprint)
- STATUS.md (where we are)
- DEVELOPMENT.md (dev workflow)
- DEPLOYMENT.md (deploy procedure)
- TESTING.md (test strategy)
- DECISIONS.md (ADR index + templates)
- .github/CODEOWNERS
- .github/workflows/ci.yml

Preserves all existing artifacts.

Refs: RugMunchMedia/fleet-template
This commit is contained in:
Crypto Rug Munch 2026-07-02 02:07:06 +07:00
commit e13bd4d774
203 changed files with 31140 additions and 0 deletions

15
.github/CODEOWNERS vendored Normal file
View file

@ -0,0 +1,15 @@
# Default owners
* @crmuncher
# Standards + fleet (slower review)
/AGENTS.md @crmuncher
/ARCHITECTURE.md @crmuncher
/README.md @crmuncher
/STATUS.md @crmuncher
/PLAN.md @crmuncher
/ROADMAP.md @crmuncher
/DECISIONS.md @crmuncher
# Sensitive paths
/.secrets/ @crmuncher
/backend/chain_vault/ @crmuncher

28
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,28 @@
---
name: Bug Report
about: Report a bug to help us improve
title: 'fix(scope): '
labels: bug
---
## Description
<!-- Clear description of the bug -->
## Steps to Reproduce
1.
2.
3.
## Expected Behavior
<!-- What should happen -->
## Actual Behavior
<!-- What actually happens -->
## Environment
- OS:
- Python/Node version:
- Project version:
## Additional Context
<!-- Logs, screenshots, etc. -->

View file

@ -0,0 +1,18 @@
---
name: Feature Request
about: Suggest an idea for this project
title: 'feat(scope): '
labels: enhancement
---
## Problem
<!-- What problem does this solve? -->
## Solution
<!-- What would you like to see happen? -->
## Alternatives
<!-- What alternatives have you considered? -->
## Additional Context
<!-- Any other context or screenshots -->

33
.github/pull_request_template.md vendored Normal file
View file

@ -0,0 +1,33 @@
## Description
<!-- What does this PR do? Why is it needed? -->
## Type of Change
- [ ] feat: new feature
- [ ] fix: bug fix
- [ ] docs: documentation
- [ ] refactor: code restructuring
- [ ] test: test addition/fix
- [ ] chore: maintenance
- [ ] security: security fix
## How Has This Been Tested?
<!-- Describe your testing approach -->
## Checklist
- [ ] My code follows the project style (ruff/mypy pass)
- [ ] I have added tests that prove my fix/feature works
- [ ] All existing tests pass (`make test`)
- [ ] No new lint warnings (`make lint`)
- [ ] No security issues (`make security`)
- [ ] I have read the pre-commit hallucination check output
- [ ] This PR has a conventional commit message
## Related Issues
<!-- Fixes #..., Closes #... -->
## Screenshots (if applicable)

52
.github/workflows/ai-review.yml vendored Normal file
View file

@ -0,0 +1,52 @@
name: AI PR Review
on:
pull_request:
types: [opened, synchronize]
jobs:
ai-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get PR diff
id: diff
run: |
git diff origin/${{ github.base_ref }}...HEAD > /tmp/pr.diff
echo "diff_size=$(wc -c < /tmp/pr.diff)" >> $GITHUB_OUTPUT
- name: AI Code Review
if: steps.diff.outputs.diff_size < 100000
env:
OPENAI_API_KEY: ${{ secrets.WP_AI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.WP_AI_BASE_URL }}
run: |
curl -s ${{ secrets.WP_AI_BASE_URL || 'https://openrouter.ai/api/v1' }}/chat/completions \
-H "Authorization: Bearer ${{ secrets.WP_AI_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"model": "${{ secrets.WP_AI_MODEL || 'openai/gpt-4o' }}",
"messages": [
{"role": "system", "content": "Review this PR diff for bugs, security issues, AI hallucinations, and maintainability problems. Output issues with file:line references."},
{"role": "user", "content": "'"$(cat /tmp/pr.diff)"'"}
]
}' > /tmp/ai_review.json
- name: Post Review Comment
if: steps.diff.outputs.diff_size < 100000
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const review = JSON.parse(fs.readFileSync('/tmp/ai_review.json', 'utf8'));
const content = review.choices?.[0]?.message?.content || 'AI review unavailable (check API key)';
const comment = `## 🤖 AI Code Review\n\n${content}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});

94
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,94 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install ruff mypy
- run: ruff check .
- run: ruff format --check .
- run: mypy . --strict --ignore-missing-imports
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r requirements.txt
- run: python3 -m pytest tests/ -v --tb=short --cov --cov-report=term-missing
security:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install bandit safety
- run: bandit -r . --quiet --skip=B101,B311
- run: safety check
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: pre-commit/action@v3.0
license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install pip-licenses
- run: bash /home/dev/scripts/license-audit.sh
continue-on-error: true
ai-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get diff
run: git diff origin/${{ github.base_ref }}...HEAD > /tmp/pr.diff
- name: AI Review
env:
OPENAI_API_KEY: ${{ secrets.WP_AI_API_KEY }}
run: |
curl -s ${{ secrets.WP_AI_BASE_URL || 'https://openrouter.ai/api/v1' }}/chat/completions \
-H "Authorization: Bearer ${{ secrets.WP_AI_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"model": "${{ secrets.WP_AI_MODEL || 'openai/gpt-4o' }}",
"messages": [
{"role": "system", "content": "Review this PR diff. List bugs, security issues, AI hallucinations, and maintainability problems."},
{"role": "user", "content": "'"$(cat /tmp/pr.diff)"'"}
]
}' > /tmp/ai_review.json