Skip to content

Commit 7875f8f

Browse files
committed
feat: add governance files, CI/CD workflows, and enhanced agent guidance
Add .cursorrules, CLAUDE.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md for community governance. Add 6 new GitHub Actions workflows: stale, label-sync, codeql, dependency-review, release, and release-drafter. Upgrade AGENTS.md with detailed per-section editing guidance matching CFX/Unity depth. Update README with new project structure and links. Made-with: Cursor
1 parent be2ecae commit 7875f8f

14 files changed

Lines changed: 1004 additions & 12 deletions

.cursorrules

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
You are working on Developer Tools Directory, a meta-repository that catalogs, standardizes, and scaffolds TMHSDigital Cursor IDE plugins and MCP servers.
2+
3+
## Repo structure
4+
5+
- `registry.json` -- single source of truth for all 9 tool repos (name, type, counts, links, status)
6+
- `standards/` -- 9 Markdown docs defining conventions (folder structure, CI/CD, manifests, pages, commits, README, AGENTS.md, versioning)
7+
- `scaffold/create-tool.py` -- Python repo generator using Jinja2 templates
8+
- `scaffold/templates/` -- 18 Jinja2 templates producing a standards-compliant repo
9+
- `docs/` -- static GitHub Pages catalog site (index.html, style.css, script.js)
10+
- `assets/` -- logo image
11+
- `.github/workflows/` -- CI/CD for this repo (validate, pages, stale, codeql, dependency-review, release, release-drafter, label-sync)
12+
- `AGENTS.md` -- AI agent guidance for this repo
13+
- `CLAUDE.md` -- Claude Code project documentation
14+
15+
## Commit conventions
16+
17+
Use conventional commits. Prefix determines changelog category:
18+
- `feat:` -- new tool in registry, new standard doc, new scaffold template
19+
- `fix:` -- corrections to existing content
20+
- `chore:` -- dependency updates, CI changes, maintenance
21+
- `docs:` -- documentation-only changes
22+
23+
## Hard rules
24+
25+
- No em dashes or en dashes anywhere. Use hyphens or rewrite.
26+
- No hardcoded credentials, tokens, API keys, or passwords.
27+
- No binary files except images in `assets/`.
28+
- `registry.json` must be valid JSON at all times -- CI enforces schema.
29+
- The catalog site uses no external CDN dependencies -- everything is self-contained.
30+
- Standards docs are written for public readership -- no internal references.
31+
- All content is CC-BY-NC-ND-4.0 licensed.
32+
33+
## When editing registry.json
34+
35+
- Every entry needs all required fields: name, repo, slug, description, type, homepage, skills, rules, mcpTools, extras, topics, status, version, language, license, pagesType, hasCI.
36+
- `type` must be `cursor-plugin` or `mcp-server`.
37+
- `skills`, `rules`, `mcpTools` must be integers.
38+
- After editing registry.json, also update:
39+
1. The embedded registry in `docs/index.html` (inside `<script type="application/json" id="registry-data">`)
40+
2. The tools table and aggregate stats line in `README.md`
41+
42+
## When editing standards/
43+
44+
- Standards are pure Markdown documentation -- no executable code.
45+
- If adding a new standard, also add a row to `standards/README.md` and the standards table in `README.md`.
46+
- If the standard changes scaffold output expectations, update the corresponding `.j2` template in `scaffold/templates/`.
47+
- Use `docs:` commit prefix for edits, `feat:` for new standards.
48+
49+
## When editing scaffold/
50+
51+
- Templates are Jinja2 (`.j2` extension) in `scaffold/templates/`.
52+
- The generator script is `scaffold/create-tool.py`. It accepts CLI args: --name, --slug, --description, --type, --mcp-server, --skills, --rules, --license, --output, --author-name, --author-email.
53+
- If adding a new template file, update `create-tool.py` to render it.
54+
- Test locally: `python scaffold/create-tool.py --name "Test" --description "Test" --mcp-server --skills 2 --rules 1 --output /tmp/test`
55+
- CI runs a dry-run test on every push.
56+
57+
## When editing docs/
58+
59+
- `docs/index.html` is the catalog site entry point.
60+
- `docs/script.js` fetches `registry.json` at runtime and renders tool cards. It also has an embedded fallback copy.
61+
- `docs/style.css` is the full stylesheet -- dark theme, responsive, card layout.
62+
- No external dependencies (CDNs, frameworks). Vanilla HTML/CSS/JS only.
63+
- The `pages.yml` workflow copies `registry.json` and `assets/` into `docs/` at deploy time.
64+
65+
## When editing workflows
66+
67+
- `validate.yml` runs on PR and push to main. Keep checks fast.
68+
- `pages.yml` deploys to GitHub Pages. It copies registry.json into docs/ during build.
69+
- `release.yml` auto-creates releases on push to main.
70+
- `release-drafter.yml` auto-drafts release notes from merged PR titles and labels.
71+
- `stale.yml` runs weekly. Issues: 60-day stale / 14-day close. PRs: 30-day stale / 14-day close.
72+
- `codeql.yml` scans Python code for security issues weekly and on push/PR.
73+
- `dependency-review.yml` audits new dependencies in PRs.
74+
- `label-sync.yml` auto-labels PRs based on changed file paths.
75+
76+
## Dependencies
77+
78+
One Python dependency: `Jinja2` (in `requirements.txt`). The docs site has zero dependencies.

.github/release-drafter.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
template: |
4+
## What's Changed
5+
6+
$CHANGES
7+
8+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
9+
categories:
10+
- title: "Features"
11+
labels:
12+
- "feature"
13+
- "registry"
14+
- title: "Standards"
15+
labels:
16+
- "standards"
17+
- title: "Scaffold"
18+
labels:
19+
- "scaffold"
20+
- title: "Bug Fixes"
21+
labels:
22+
- "bug"
23+
- "fix"
24+
- title: "Documentation"
25+
labels:
26+
- "documentation"
27+
- "docs"
28+
- title: "CI / Infrastructure"
29+
labels:
30+
- "ci"
31+
- "infrastructure"
32+
- "dependencies"
33+
- title: "Other Changes"
34+
labels:
35+
- "*"
36+
change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
37+
change-title-escapes: '\<*_&'
38+
version-resolver:
39+
major:
40+
labels:
41+
- "major"
42+
- "breaking"
43+
minor:
44+
labels:
45+
- "minor"
46+
- "feature"
47+
- "registry"
48+
patch:
49+
labels:
50+
- "patch"
51+
- "bug"
52+
- "fix"
53+
- "docs"
54+
default: patch
55+
exclude-labels:
56+
- "skip-changelog"
57+
autolabeler:
58+
- label: "documentation"
59+
files:
60+
- "*.md"
61+
- "docs/**"
62+
- label: "ci"
63+
files:
64+
- ".github/**"
65+
- label: "standards"
66+
files:
67+
- "standards/**"
68+
- label: "scaffold"
69+
files:
70+
- "scaffold/**"
71+
- label: "registry"
72+
files:
73+
- "registry.json"

.github/workflows/codeql.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: "0 6 * * 1"
10+
11+
permissions:
12+
actions: read
13+
contents: read
14+
security-events: write
15+
16+
jobs:
17+
analyze:
18+
name: Analyze Python
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [python]
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Initialize CodeQL
28+
uses: github/codeql-action/init@v3
29+
with:
30+
languages: ${{ matrix.language }}
31+
32+
- name: Autobuild
33+
uses: github/codeql-action/autobuild@v3
34+
35+
- name: Perform CodeQL Analysis
36+
uses: github/codeql-action/analyze@v3
37+
with:
38+
category: "/language:${{ matrix.language }}"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dependency Review
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
dependency-review:
13+
name: Audit dependencies
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/dependency-review-action@v4
18+
with:
19+
fail-on-severity: high
20+
comment-summary-in-pr: always

.github/workflows/label-sync.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Label PRs
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
label:
13+
name: Auto-label by path
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Get changed files
19+
id: changed
20+
run: |
21+
FILES=$(gh pr diff ${{ github.event.pull_request.number }} --name-only)
22+
echo "files<<EOF" >> "$GITHUB_OUTPUT"
23+
echo "$FILES" >> "$GITHUB_OUTPUT"
24+
echo "EOF" >> "$GITHUB_OUTPUT"
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Apply labels
29+
run: |
30+
LABELS=""
31+
32+
if echo "$FILES" | grep -q "^standards/"; then
33+
LABELS="$LABELS,standards"
34+
fi
35+
36+
if echo "$FILES" | grep -q "^scaffold/"; then
37+
LABELS="$LABELS,scaffold"
38+
fi
39+
40+
if echo "$FILES" | grep -q "^docs/"; then
41+
LABELS="$LABELS,documentation"
42+
fi
43+
44+
if echo "$FILES" | grep -q "^registry.json"; then
45+
LABELS="$LABELS,registry"
46+
fi
47+
48+
if echo "$FILES" | grep -q "^\.github/"; then
49+
LABELS="$LABELS,ci"
50+
fi
51+
52+
LABELS="${LABELS#,}"
53+
54+
if [ -n "$LABELS" ]; then
55+
gh pr edit ${{ github.event.pull_request.number }} --add-label "$LABELS"
56+
fi
57+
env:
58+
FILES: ${{ steps.changed.outputs.files }}
59+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request_target:
7+
types: [opened, reopened, synchronize]
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
update-release-draft:
15+
name: Draft release notes
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: release-drafter/release-drafter@v6
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- "*.md"
8+
- "docs/**"
9+
- "standards/**"
10+
- "LICENSE"
11+
- ".github/release-drafter.yml"
12+
13+
permissions:
14+
contents: write
15+
16+
concurrency:
17+
group: release
18+
cancel-in-progress: false
19+
20+
jobs:
21+
release:
22+
name: Create release
23+
runs-on: ubuntu-latest
24+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Get latest tag
31+
id: tag
32+
run: |
33+
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
34+
echo "current=$TAG" >> "$GITHUB_OUTPUT"
35+
36+
- name: Determine version bump
37+
id: bump
38+
run: |
39+
CURRENT="${{ steps.tag.outputs.current }}"
40+
CURRENT="${CURRENT#v}"
41+
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
42+
43+
COMMITS=$(git log "${{ steps.tag.outputs.current }}..HEAD" --pretty=format:"%s" 2>/dev/null || git log --pretty=format:"%s")
44+
45+
if echo "$COMMITS" | grep -qE "^feat!:|BREAKING CHANGE"; then
46+
MAJOR=$((MAJOR + 1))
47+
MINOR=0
48+
PATCH=0
49+
elif echo "$COMMITS" | grep -qE "^feat(\(.*\))?:"; then
50+
MINOR=$((MINOR + 1))
51+
PATCH=0
52+
else
53+
PATCH=$((PATCH + 1))
54+
fi
55+
56+
NEW="$MAJOR.$MINOR.$PATCH"
57+
echo "version=$NEW" >> "$GITHUB_OUTPUT"
58+
echo "tag=v$NEW" >> "$GITHUB_OUTPUT"
59+
60+
- name: Create tag
61+
run: |
62+
git config user.name "github-actions[bot]"
63+
git config user.email "github-actions[bot]@users.noreply.github.com"
64+
git tag -a "${{ steps.bump.outputs.tag }}" -m "Release ${{ steps.bump.outputs.tag }}"
65+
git push origin "${{ steps.bump.outputs.tag }}"
66+
67+
- name: Create GitHub Release
68+
run: |
69+
gh release create "${{ steps.bump.outputs.tag }}" \
70+
--title "${{ steps.bump.outputs.tag }}" \
71+
--generate-notes
72+
env:
73+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)