Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Summary

Describe what changed and why.

## Branch routing

- [ ] Ordinary work targets `develop` from `feature/*`.
- [ ] A `main` PR comes only from `release_*` or `hotfix/*`.
- [ ] Release and hotfix changes will also be merged into `develop`.

## Skill checks

- [ ] Changed `SKILL.md` files have valid YAML frontmatter.
- [ ] Dependencies and supported versions are documented consistently.
- [ ] Examples, resources, JSON files, and scripts were validated where applicable.
- [ ] Security, confirmation, secret-handling, network, and fee implications were reviewed.
- [ ] README and changelog entries were updated when behavior or the public catalog changed.

## Verification

List the commands or agent scenarios used to verify the change.
35 changes: 32 additions & 3 deletions .github/workflows/audit-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Audit PR
on:
pull_request:
branches:
- develop
- main
types: [opened, synchronize, reopened, ready_for_review]
issue_comment:
Expand All @@ -21,32 +22,50 @@ concurrency:
jobs:
audit-on-pr:
name: Audit on pull request
# Disabled by default while the self-hosted audit runner is unavailable.
# Set the repository variable AUDIT_AUTO_ENABLED=true to restore automatic audits.
if: github.event_name == 'pull_request'
runs-on: [self-hosted, Linux, ARM64, audit-linux]
runs-on: ${{ fromJSON(vars.AUDIT_AUTO_ENABLED == 'true' && github.event.pull_request.head.repo.full_name == github.repository && '["self-hosted","Linux","ARM64","audit-linux"]' || '["ubuntu-latest"]') }}
env:
AUTO_AUDIT_ENABLED: ${{ vars.AUDIT_AUTO_ENABLED == 'true' && github.event.pull_request.head.repo.full_name == github.repository }}

steps:
- name: Automatic audit disabled
if: env.AUTO_AUDIT_ENABLED != 'true'
run: echo "Automatic audit is disabled"

- name: Checkout PR head
if: env.AUTO_AUDIT_ENABLED == 'true'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Check required tools
if: env.AUTO_AUDIT_ENABLED == 'true'
run: |
which git
which zip
which jq
which python3

- name: Create source archive
if: env.AUTO_AUDIT_ENABLED == 'true'
id: archive
shell: bash
run: |
ARCHIVE_NAME="${{ github.event.repository.name }}.zip"
if git ls-files -s | awk '$1 == "120000" { found=1 } END { exit !found }'; then
echo "Refusing to archive tracked symbolic links"
exit 1
fi
rm -f "/tmp/${ARCHIVE_NAME}"
zip -r "/tmp/${ARCHIVE_NAME}" .
git ls-files -z | xargs -0 -r zip -q "/tmp/${ARCHIVE_NAME}" --
test -s "/tmp/${ARCHIVE_NAME}"
echo "archive_name=${ARCHIVE_NAME}" >> "$GITHUB_OUTPUT"

- name: Submit audit job
if: env.AUTO_AUDIT_ENABLED == 'true'
id: submit
shell: bash
run: |
Expand All @@ -69,6 +88,7 @@ jobs:
echo "report_url=$REPORT_URL" >> "$GITHUB_OUTPUT"

- name: Poll report until ready
if: env.AUTO_AUDIT_ENABLED == 'true'
id: poll
shell: bash
run: |
Expand Down Expand Up @@ -96,6 +116,7 @@ jobs:
exit 1

- name: Fetch markdown report
if: env.AUTO_AUDIT_ENABLED == 'true'
shell: bash
run: |
REPORT_PATH="${{ steps.submit.outputs.report_url }}"
Expand All @@ -111,6 +132,7 @@ jobs:
fi

- name: Normalize markdown for GitHub comment
if: env.AUTO_AUDIT_ENABLED == 'true'
shell: bash
run: |
python3 <<'PY'
Expand All @@ -128,6 +150,7 @@ jobs:
PY

- name: Comment markdown report to PR
if: env.AUTO_AUDIT_ENABLED == 'true'
uses: actions/github-script@v7
with:
script: |
Expand Down Expand Up @@ -187,6 +210,7 @@ jobs:

- name: Check required tools
run: |
which git
which zip
which jq
which python3
Expand All @@ -196,8 +220,13 @@ jobs:
shell: bash
run: |
ARCHIVE_NAME="${{ github.event.repository.name }}.zip"
if git ls-files -s | awk '$1 == "120000" { found=1 } END { exit !found }'; then
echo "Refusing to archive tracked symbolic links"
exit 1
fi
rm -f "/tmp/${ARCHIVE_NAME}"
zip -r "/tmp/${ARCHIVE_NAME}" .
git ls-files -z | xargs -0 -r zip -q "/tmp/${ARCHIVE_NAME}" --
test -s "/tmp/${ARCHIVE_NAME}"
echo "archive_name=${ARCHIVE_NAME}" >> "$GITHUB_OUTPUT"

- name: Submit audit job
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/branch-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Validate branch policy

on:
pull_request:
branches:
- develop
- main
types: [opened, synchronize, reopened, edited]

permissions:
contents: read

jobs:
source-and-target:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate pull request route
run: sh scripts/check_branch_policy.sh "${{ github.base_ref }}" "${{ github.head_ref }}"
12 changes: 8 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,15 @@ Always include:

### Contribution Workflow

1. **Create skill directory** under `skills/`
2. **Write SKILL.md** following the format
3. **Add examples** in `examples/`
1. **Synchronize `develop`** with the upstream repository
2. **Create `feature/<short_description>`** from `develop`
3. **Create or update the Skill** following this guide
4. **Test thoroughly** with AI agents
5. **Document dependencies** clearly
6. **Submit for review**
6. **Submit a pull request to `develop`**

Do not push directly to `develop` or `main`. Release and hotfix work follows
[BRANCHING.md](./BRANCHING.md).

### Review Criteria

Expand All @@ -327,6 +330,7 @@ Always include:

| Resource | Description |
|----------|-------------|
| [BRANCHING.md](./BRANCHING.md) | Development, release, and hotfix workflow |
| [mcp-server-tron](../mcp-server-tron/) | TRON blockchain MCP server |
| [DEVELOPER_GUIDE.md](../DEVELOPER_GUIDE.md) | Project-wide development guide |
| [agents.md](../agents.md) | Agent architecture documentation |
Expand Down
86 changes: 86 additions & 0 deletions BRANCHING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Branching and Release Workflow

This repository follows the java-tron branching model while retaining `main` as the name of the
stable release branch.

## Key branches

| Branch | Purpose |
|---|---|
| `develop` | Default development and integration branch for the next release |
| `main` | Stable branch containing only released Skills collections |
| `release_vX.Y.Z` | Release snapshot cut from `develop`, regression-tested, and permanently retained |
| `feature/*` | Feature, fix, documentation, test, refactor, or CI work cut from `develop` |
| `hotfix/*` | Urgent fix cut from `main` for an already released version |

Direct pushes to `develop` and `main` are not allowed. Changes enter both branches through reviewed
pull requests.

## Development flow

1. Synchronize a local `develop` branch with `upstream/develop`.
2. Create `feature/<short_description>` from `develop`.
3. Submit the pull request to `develop`.
4. After review and required checks pass, merge it into `develop`.

Use `feature/*` for every ordinary change. The commit and pull-request type still communicates
whether the work is a feature, fix, documentation update, refactor, test, build, or CI change.

## Release flow

1. Create `release_vX.Y.Z` from `develop` when the release scope is frozen.
2. Update the repository and Skill versions, changelog, dependency pins, and release notes there.
3. Run regression, installation, and agent-behavior tests on the release branch.
4. Merge release-blocking fixes directly into `release_vX.Y.Z`; do not add unrelated features.
5. After regression passes, merge `release_vX.Y.Z` into `main` and tag the merge commit `vX.Y.Z`.
6. Merge `release_vX.Y.Z` back into `develop` so every release fix is preserved.
7. Permanently retain the release branch as the source snapshot for that release.

## Hotfix flow

1. Create `hotfix/<short_description>` from `main`.
2. Limit the branch to the released defect and its tests or documentation.
3. Merge the hotfix into `main` and create the corresponding patch release tag.
4. Merge the same hotfix into `develop`.

## Pull-request routing

| Target | Allowed source branches |
|---|---|
| `develop` | `feature/*`, `release_*`, `hotfix/*` |
| `main` | `release_*`, `hotfix/*` |

The `release_*` and `hotfix/*` routes back to `develop` are mandatory. A feature branch must never
target `main` directly.

## Installation channels

Because `develop` is the development branch, public installation instructions must select a stable
source explicitly:

```bash
npx skills add https://github.com/BofAI/skills/tree/main
```

Use the development branch only for intentional pre-release testing:

```bash
npx skills add https://github.com/BofAI/skills/tree/develop
```

For reproducible production installation, prefer a formal version tag when one is available:

```bash
npx skills add https://github.com/BofAI/skills/tree/vX.Y.Z
```

## Required repository settings

Configure GitHub after the bootstrap pull request lands:

- make `develop` the default branch;
- protect `develop` and `main` from direct and force pushes;
- require pull requests, at least one approval, and all required checks;
- require conversation resolution;
- restrict deletion of both long-lived branches;
- allow `main` pull requests only from `release_*` and `hotfix/*` through the branch-policy check.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [Unreleased]

### Improvements

- Added the `develop`, `main`, `release_*`, `feature/*`, and `hotfix/*` branch workflow.
- Added pull-request branch routing checks and a repository pull-request template.
- Pinned stable installation documentation to the `main` branch.

## [1.5.9] - 2026-07-09

### Improvements
Expand Down
Loading
Loading