From 26e31a08a8a2935d63420986ca7678002b326771 Mon Sep 17 00:00:00 2001 From: infinityplusone Date: Sun, 19 Apr 2026 13:58:31 -0400 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20adopt=20mg-tools=20=E2=80=94=20git?= =?UTF-8?q?ignore=20baseline=20for=20internal=20dev=20tooling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the per-developer gitignore entries needed for MakeGov team members who use mg-tools (an internal Claude Code plugin that provides shared agents, skills, rules, and hooks across our repos). Internal-focused only — no effect on the published SDK, its API, or external contributors. Ignored paths: - .claude-plugin/ plugin pointer - .claude/settings.json merged Claude Code permissions - .claude/settings.local.json personal overrides - .claude/mg-tools-integration.md team-only plugin notes - .mcp.json / .mcp.disabled.json MCP server configs (per-dev) - .mg-tools/ scratch, config, diary, version - .claude.bak.* / .cursor.bak.* / .mcp.json.bak.* install backups - CLAUDE.md per-developer AI-assistant context (each team member regenerates from mg-tools' sdk-python template) Also fixes a missing trailing newline on the pre-existing 'examples/' entry that would otherwise concatenate with any appended block. External contributors don't need any of this. README, CONTRIBUTING, and docs/ remain the contribution entry points. --- .gitignore | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 491b684..c825ab1 100644 --- a/.gitignore +++ b/.gitignore @@ -149,4 +149,17 @@ Thumbs.db yoni/ .cursor/* -examples/ \ No newline at end of file +examples/ + +# --- mg-tools (per-developer; re-run 'mg-tools install' after clone) --- +.claude-plugin/ +.claude/settings.json +.claude/settings.local.json +.claude/mg-tools-integration.md +.mcp.json +.mcp.disabled.json +.mg-tools/ +.claude.bak.* +.cursor.bak.* +.mcp.json.bak.* +CLAUDE.md From 0d7da96b5d0873f1befb1028fa8632aeac77ba0c Mon Sep 17 00:00:00 2001 From: infinityplusone Date: Sun, 19 Apr 2026 22:12:32 -0400 Subject: [PATCH 2/2] chore: adopt mg-tools v0.9.17 (.github templates + gitignore) --- .github/ISSUE_TEMPLATE/bug.yml | 35 ++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/feature.yml | 26 +++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 22 +++++++++ .github/workflows/changelog-check.yml | 30 ++++++++++++ .github/workflows/ci.yml | 30 ++++++++++++ .github/workflows/docs-dispatch.yml | 67 +++++++++++++++++++++++++++ 7 files changed, 215 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/changelog-check.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/docs-dispatch.yml diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..36074d8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,35 @@ +name: Bug report +description: Something broke or behaves unexpectedly. +labels: [bug] +body: + - type: textarea + id: what + attributes: + label: What happened? + description: Describe the behavior you saw. + validations: + required: true + - type: textarea + id: expected + attributes: + label: What did you expect? + validations: + required: true + - type: textarea + id: repro + attributes: + label: Repro steps + description: Minimum steps to reproduce. Commands, inputs, environment. + render: shell + validations: + required: true + - type: input + id: version + attributes: + label: Version / commit + description: "e.g. v0.2.3 or abc123" + - type: textarea + id: context + attributes: + label: Additional context + description: Logs, screenshots, environment notes. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..f895026 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Ask a question (Discussions) + url: https://github.com/makegov/mg-tools/discussions + about: For open-ended questions, use Discussions rather than an issue. diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..fad00ea --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,26 @@ +name: Feature request +description: Propose a new capability or enhancement. +labels: [enhancement] +body: + - type: textarea + id: problem + attributes: + label: Problem + description: What are you trying to do? What's in the way today? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposal + description: Rough shape of the solution. API, UX, or implementation notes. + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + - type: textarea + id: context + attributes: + label: Additional context diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..4343fd0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,22 @@ +## Summary + + + +- + +## Why + + + +## Testing + + + +- [ ] +- [ ] + +## Risks / follow-ups + + + +- diff --git a/.github/workflows/changelog-check.yml b/.github/workflows/changelog-check.yml new file mode 100644 index 0000000..91803fb --- /dev/null +++ b/.github/workflows/changelog-check.yml @@ -0,0 +1,30 @@ +name: changelog-check +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + changelog: + name: Verify CHANGELOG entry + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Check for CHANGELOG diff + run: | + set -e + base="origin/${{ github.base_ref }}" + git fetch --no-tags --depth=50 origin "${{ github.base_ref }}" + changed=$(git diff --name-only "$base...HEAD") + echo "Changed files:" + echo "$changed" + # Skip if only docs/meta files changed. + if echo "$changed" | grep -vE '^(\.github/|docs/|README\.md$|CHANGELOG\.md$|\.gitignore$)' | grep -q .; then + if ! echo "$changed" | grep -qE '^(CHANGELOG\.md|docs/CHANGELOG\.md)$'; then + echo "::error::Source files changed but neither CHANGELOG.md nor docs/CHANGELOG.md updated." + exit 1 + fi + fi + echo "OK." diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d97b906 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: ci +on: + pull_request: + push: + branches: [main] + +jobs: + python: + if: hashFiles('pyproject.toml') != '' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v4 + - run: uv sync --all-extras + - run: uv run ruff check . + - run: uv run ruff format --check . + - run: uv run pytest -x + + node: + if: hashFiles('package.json') != '' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - run: npm run lint --if-present + - run: npm test diff --git a/.github/workflows/docs-dispatch.yml b/.github/workflows/docs-dispatch.yml new file mode 100644 index 0000000..65f6a22 --- /dev/null +++ b/.github/workflows/docs-dispatch.yml @@ -0,0 +1,67 @@ +name: Docs dispatch + +# Fires on push to the repo's default branch when content that affects external +# docs (or the public changelog) changes. Notifies the composer repo +# (makegov/docs) via repository_dispatch so it rebuilds without waiting for +# someone to push to docs directly. +# +# Installed by mg-tools into repos whose docsRole is `coloc-source` or +# `editorial-split-source`. For editorial-split repos (e.g. tango), the +# external paths watched are narrower — only docs/CHANGELOG.md and +# docs/internal/** (since the rest of external docs lives in the composer). +# +# Required secrets: +# DOCS_DISPATCH_TOKEN — GitHub token with repo:write on makegov/docs +# +# Required variables (optional): +# DOCS_TARGET_REPO — override target (default: makegov/docs) +# +# On install, mg-tools substitutes the path filters based on docsRole. + +on: + push: + branches: + - main + - master + - staging + paths: + - "docs/**" + - "docs/CHANGELOG.md" + - "README.md" + workflow_dispatch: + +jobs: + dispatch: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Detect changed paths + id: changes + run: | + set -euo pipefail + # Default to all-on-first-commit if there's only one commit in the ref. + base=$(git rev-parse HEAD~1 2>/dev/null || git rev-parse HEAD) + changed=$(git diff --name-only "$base" HEAD | paste -sd, -) + echo "changed=$changed" >> "$GITHUB_OUTPUT" + if [[ -n "$changed" ]]; then + echo "has_changes=true" >> "$GITHUB_OUTPUT" + else + echo "has_changes=false" >> "$GITHUB_OUTPUT" + fi + + - name: Dispatch to docs composer + if: steps.changes.outputs.has_changes == 'true' + env: + GH_TOKEN: ${{ secrets.DOCS_DISPATCH_TOKEN }} + TARGET: ${{ vars.DOCS_TARGET_REPO || 'makegov/docs' }} + run: | + gh api "repos/$TARGET/dispatches" \ + -f event_type=external_updated \ + -f "client_payload[source_repo]=${{ github.repository }}" \ + -f "client_payload[source_ref]=${{ github.sha }}" \ + -f "client_payload[changed_paths]=${{ steps.changes.outputs.changed }}"