diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4319473 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: ci + +on: + push: + branches: + - main + - moltenhub-* + pull_request: + branches: + - main + +jobs: + repository-checks: + name: repository-checks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Validate repository layout + run: bash scripts/validate-repo.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7b155e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Local runtime artifacts +.codex +.task-logs/ +AGENTS.md +.moltenhub-agents-*.md diff --git a/README.md b/README.md index a46ae92..9d1950b 100644 --- a/README.md +++ b/README.md @@ -1 +1,17 @@ -# .github \ No newline at end of file +# .github + +Organization metadata repository for `Molten-Bot`. + +## Scope + +This repository is intentionally minimal and currently only contains: + +- `README.md` +- `profile/README.md` + +It does **not** contain product application source code (frontend, backend, or tests). + +## Task Routing + +If a task is about product behavior (for example, UI bugs such as form fields not rendering), +run the task against the product repository that owns that code, not `Molten-Bot/.github`. diff --git a/scripts/validate-repo.sh b/scripts/validate-repo.sh new file mode 100755 index 0000000..a42d178 --- /dev/null +++ b/scripts/validate-repo.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -euo pipefail + +for required_ignore_pattern in .codex .task-logs/ AGENTS.md ".moltenhub-agents-*.md"; do + if ! grep -Fqx "$required_ignore_pattern" .gitignore; then + echo "error: .gitignore is missing '$required_ignore_pattern'" + exit 1 + fi +done + +for required_file in README.md profile/README.md; do + if [[ ! -f "$required_file" ]]; then + echo "error: missing required file '$required_file'" + exit 1 + fi +done + +if ! grep -Fq "## Task Routing" README.md; then + echo "error: README.md must include the 'Task Routing' section" + exit 1 +fi + +while IFS= read -r markdown_file; do + if grep -nE "[[:blank:]]$" "$markdown_file" >/dev/null; then + echo "error: trailing whitespace found in $markdown_file" + grep -nE "[[:blank:]]$" "$markdown_file" + exit 1 + fi +done < <(git ls-files "*.md") + +echo "repository validation passed"