Skip to content
37 changes: 0 additions & 37 deletions ISSUE_TEMPLATE/bug_report.md

This file was deleted.

2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: true
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://mux-lang.dev
Expand Down
23 changes: 0 additions & 23 deletions ISSUE_TEMPLATE/feature_request.md

This file was deleted.

19 changes: 0 additions & 19 deletions PULL_REQUEST_TEMPLATE.md

This file was deleted.

18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
Organization-level defaults for the [muxlang](https://github.com/muxlang) org:

- `profile/README.md` - the org profile shown on the [organization page](https://github.com/muxlang).
- `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md` - shared community-health defaults applied
org-wide to any repo that does not define its own.
- `ISSUE_TEMPLATE/`, `PULL_REQUEST_TEMPLATE.md` - default issue/PR templates.
- `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md` - shared community-health defaults.
- `labels/` - canonical label YAML and per-repo overlays.
- `templates/<repo>/` - canonical issue template sources synced to each repo.
- `scripts/sync-labels.sh` - apply label YAML to org repos (`gh` CLI required).
- `scripts/sync-templates.sh` - copy `templates/<repo>/` into a repo checkout.
- `scripts/retire-labels.sh` - delete retired labels org-wide.
- `scripts/clear-milestones.sh` - bulk-clear milestones from a repo's issues.

Per-repo files override these defaults. See each repo's own `README.md` and
`AGENTS.md` for repo-specific guidance.
Policy and workflow rules:
[mux-context/docs/repo-governance.md](https://github.com/muxlang/mux-context/blob/main/docs/repo-governance.md).

Per-repo `.github/ISSUE_TEMPLATE/`, `.github/workflows/issue-triage.yml`, and
`.github/labels.yml` are synced from `templates/` here via `scripts/sync-templates.sh`.
Do not copy templates or invent labels in individual repos.
Comment thread
greptile-apps[bot] marked this conversation as resolved.
27 changes: 7 additions & 20 deletions labels/labels.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Canonical label set for every muxlang repo. This file is the authoritative
# list; apply it to each repo manually (e.g. gh label create --force). See
# docs/repo-governance.md in mux-context for the taxonomy and Linear mapping.
# ASCII only (org rule). Colors are 6-digit hex, no leading '#'.
# Canonical label set for every muxlang repo. Apply with scripts/sync-labels.sh.
# Policy: mux-context/docs/repo-governance.md. ASCII only; 6-digit hex colors.

# --- Kind (complements the issue type) ---
# --- Kind ---
- name: documentation
color: 0075ca
description: Improvements or additions to documentation
Expand All @@ -19,22 +17,11 @@
- name: testing
color: 9f267d
description: Test coverage or test infrastructure
- name: enhancement
color: a2eeef
description: Improvement to existing behavior or UX

# --- Priority (maps to Linear priority) ---
- name: "priority: urgent"
color: b60205
description: Needs attention now
- name: "priority: high"
color: d93f0b
description: Important, schedule soon
- name: "priority: medium"
color: fbca04
description: Normal priority
- name: "priority: low"
color: 0e8a16
description: Nice to have, no rush

# --- Quality (works, but feels off) ---
# --- Quality ---
- name: inconsistency
color: c5def5
description: Behaves or looks different across places that should match
Expand Down
11 changes: 11 additions & 0 deletions labels/mux-context.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# mux-context overlay on labels.yml

- name: architecture
color: 006b75
description: Cross-repo architecture or repo map
- name: adr
color: 5319e7
description: Architecture decision record
- name: governance
color: fbca04
description: Labels, templates, project board, or process
8 changes: 8 additions & 0 deletions labels/mux-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# mux-runtime overlay on labels.yml

- name: stdlib
color: "560143"
description: Standard library addition or change
- name: ffi
color: 4a7967
description: C-ABI or FFI surface change
26 changes: 26 additions & 0 deletions labels/mux-syntax-highlighting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# mux-syntax-highlighting overlay on labels.yml

- name: syntax-spec
color: 006b75
description: syntax-matrix.json or canonical spec change
- name: textmate
color: 1d76db
description: TextMate grammar generation or parity
- name: editor-support
color: 5319e7
description: editor-support configs (Sublime, JetBrains, etc.)
- name: vscode
color: 0078d4
description: VSCode extension or grammar package
- name: sublime
color: ff9800
description: Sublime Text highlighting or config
- name: jetbrains
color: 000000
description: JetBrains IDE highlighting or config
- name: neovim
color: 57a143
description: Neovim editor-support config
- name: helix
color: 675b2d
description: Helix editor-support config
11 changes: 11 additions & 0 deletions labels/mux-website-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# mux-website-api overlay on labels.yml

- name: security
color: b60205
description: Sandbox, auth, rate limits, or untrusted code execution
- name: sandbox
color: d93f0b
description: Compile/run isolation or resource limits
- name: deployment
color: fbca04
description: Fly.io deploy, Docker image, or MUX_VERSION pin
14 changes: 14 additions & 0 deletions labels/mux-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# mux-website overlay on labels.yml

- name: playground
color: 1d76db
description: In-browser playground UI or behavior
- name: docs-site
color: 0075ca
description: Docusaurus docs site content or layout
- name: mux-ai
color: 5319e7
description: Docs AI assistant worker or indexing
- name: docusaurus
color: 0e8a16
description: Docusaurus build, config, or tooling
20 changes: 20 additions & 0 deletions labels/tree-sitter-mux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# tree-sitter-mux overlay on labels.yml

- name: grammar
color: 006b75
description: grammar.js or parser behavior
- name: queries
color: 5319e7
description: Highlight or query .scm files
- name: syntax-matrix
color: 1d76db
description: Vendored syntax-matrix.json sync or drift
- name: neovim
color: 57a143
description: Neovim / nvim-treesitter integration
- name: helix
color: 675b2d
description: Helix grammar or query integration
- name: emacs
color: 7b1fa2
description: Emacs tree-sitter integration
28 changes: 28 additions & 0 deletions scripts/clear-milestones.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Bulk-clear milestones from all issues in a repo (issues are not deleted).
# Usage: ./scripts/clear-milestones.sh <repo>
set -euo pipefail

REPO="${1:?usage: clear-milestones.sh <repo>}"
FULL="muxlang/$REPO"

echo "Clearing milestones on $FULL ..."
gh api "repos/$FULL/issues?state=all&per_page=100" --paginate \
--jq '.[] | select(.milestone != null and (.pull_request | not)) | .number' | while read -r num; do
id="$(gh issue view "$num" --repo "$FULL" --json id -q .id)"
gh api graphql -f query="
mutation {
updateIssue(input: {id: \"$id\", milestoneId: null}) {
issue { number }
}
}"
Comment thread
greptile-apps[bot] marked this conversation as resolved.
echo " cleared #$num"
done

echo "Closing milestones on $FULL ..."
gh api "repos/$FULL/milestones?state=all&per_page=100" --paginate --jq '.[].number' | while read -r n; do
gh api -X PATCH "repos/$FULL/milestones/$n" -f state=closed
echo " closed milestone #$n"
done

echo "Done."
21 changes: 21 additions & 0 deletions scripts/retire-labels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Delete retired labels from all muxlang repos.
set -euo pipefail

REPOS=(
mux-compiler mux-runtime mux-website-api mux-syntax-highlighting
mux-website tree-sitter-mux mux-context .github
)
RETIRED=(
"priority: urgent" "priority: high" "priority: medium" "priority: low"
"needs tested" "bug" "feature"
)

for repo in "${REPOS[@]}"; do
echo "Retiring labels on muxlang/$repo ..."
for label in "${RETIRED[@]}"; do
gh label delete "$label" --repo "muxlang/$repo" --yes 2>/dev/null || true
done
done

echo "Done."
74 changes: 74 additions & 0 deletions scripts/sync-labels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env bash
# Apply canonical labels from labels/*.yml to muxlang repos.
# Usage: ./scripts/sync-labels.sh [repo ...]
# With no args, syncs every repo in ALL_REPOS below.
set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ALL_REPOS=(
mux-compiler
mux-runtime
mux-website-api
mux-syntax-highlighting
mux-website
tree-sitter-mux
mux-context
.github
)

apply_yaml() {
local repo="$1"
local file="$2"
local name="" color="" description=""

while IFS= read -r line; do
case "$line" in
"- name:"*)
name="${line#- name:}"
name="${name#\"}"
name="${name%\"}"
name="${name#"${name%%[![:space:]]*}"}"
name="${name%"${name##*[![:space:]]}"}"
;;
" color:"*)
color="${line# color: }"
color="${color#\"}"
color="${color%\"}"
;;
" description:"*)
description="${line# description: }"
if [[ -n "$name" && -n "$color" ]]; then
gh label create "$name" \
--repo "muxlang/$repo" \
--color "$color" \
--description "$description" \
--force
name=""
color=""
description=""
fi
Comment thread
greptile-apps[bot] marked this conversation as resolved.
;;
esac
done < "$file"
}

sync_repo() {
local repo="$1"
echo "Syncing muxlang/$repo ..."
apply_yaml "$repo" "$ROOT/labels/labels.yml"
if [[ -f "$ROOT/labels/$repo.yml" ]]; then
apply_yaml "$repo" "$ROOT/labels/$repo.yml"
fi
}

if [[ "$#" -gt 0 ]]; then
TARGETS=("$@")
else
TARGETS=("${ALL_REPOS[@]}")
fi

for repo in "${TARGETS[@]}"; do
sync_repo "$repo"
done

echo "Done."
25 changes: 25 additions & 0 deletions scripts/sync-templates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copy canonical issue templates (and shared bootstrap files) into a repo checkout.
# Usage: ./scripts/sync-templates.sh <repo> <path-to-repo-checkout>
#
# Example:
# ./scripts/sync-templates.sh mux-runtime ../mux-runtime
set -euo pipefail

REPO="${1:?usage: sync-templates.sh <repo> <dest>}"
DEST="${2:?usage: sync-templates.sh <repo> <dest>}"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SRC="$ROOT/templates/$REPO/ISSUE_TEMPLATE"

if [[ ! -d "$SRC" ]]; then
echo "error: no templates for repo '$REPO' at $SRC" >&2
exit 1
fi

rm -rf "$DEST/.github/ISSUE_TEMPLATE"
mkdir -p "$DEST/.github/ISSUE_TEMPLATE" "$DEST/.github/workflows"
cp -r "$SRC/." "$DEST/.github/ISSUE_TEMPLATE/"
Comment thread
greptile-apps[bot] marked this conversation as resolved.
cp "$ROOT/templates/shared/workflows/issue-triage.yml" "$DEST/.github/workflows/issue-triage.yml"
cp "$ROOT/templates/shared/labels.yml" "$DEST/.github/labels.yml"

echo "Synced templates, issue-triage workflow, and labels bootstrap to $DEST"
Loading
Loading