Skip to content
Closed
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
2 changes: 2 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.worktrees/
tmp/
20 changes: 20 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by `bazel run //:preset.update`; the content follows the Bazel
# version, so it is regenerated whenever .bazelversion moves. It comes first
# so the flags below can override it.
import %workspace%/preset.bazelrc

# aspect_tools_telemetry, which aspect_rules_js brings in, reports the Bazel
# and module versions in use unless told not to.
common --repo_env=DO_NOT_TRACK=1

# Bazel's convenience links start with a dot, so they stay out of tools that skip
# hidden directories. Clones keep their old bazel-* links until Bazel runs again.
common --symlink_prefix=.bazel-

common --lockfile_mode=error

# Fail when a bazel_dep version is lower than what the module graph resolves
# to, so the declared minimums stay honest.
common --check_direct_dependencies=error

try-import %workspace%/.bazelrc.user
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9.3.2
16 changes: 16 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"includeCoAuthoredBy": false,
"attribution": {
"commit": "",
"pr": ""
},
"permissions": {
"allow": [],
"deny": [
"Bash(gh pr create:*)",
"Bash(gh pr edit:*)",
"Bash(gh pr merge:*)"
]
},
"enabledMcpjsonServers": []
}
56 changes: 56 additions & 0 deletions .cspell-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
addopts
bazelignore
bazelisk
bazelrc
bazelversion
buildcop
buildifier
capsys
Cocogitto
complexipy
cpus
cuda
deptry
docstrings
dunder
frontmatter
gitleaks
govulncheck
hardwrap
heapdump
hermeticity
hprof
keepalive
lockfiles
mcpjson
mutmut
nobuild
nocache
noexperimental
noremote
nosandbox
prek
pyrefly
pytestmark
rumdl
runfile
runfiles
ryl
rylignore
sandboxed
shellcheck
shfmt
srcs
starlark
tbhb
tbhbdev
tbhbgraph
tera
testdata
testpaths
tombi
tricolon
uncomparables
unmatch
worktrees
zizmor
24 changes: 24 additions & 0 deletions .cspell.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"language": "en",
"ignorePaths": [
".mise/**/*",
".rumdl_cache/**/*",
".vale/**/*",
".venv/**/*",
"bazel-*/**/*",
".bazel-*/**/*",
"coverage.xml",
"MODULE.bazel.lock",
"mise.lock",
"tmp/**/*",
"uv.lock"
],
"dictionaryDefinitions": [
{
"name": "graph",
"path": "./.cspell-words.txt",
"addWords": true
}
],
"dictionaries": ["graph", "python"]
}
39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# https://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{bat,cmd}]
end_of_line = crlf

[*.go]
indent_style = tab

[{*.bzl,BUILD,BUILD.bazel,MODULE.bazel,WORKSPACE,*.bazelrc,.bazelrc}]
indent_style = space
indent_size = 2

[*.{json,jsonc,json5}]
indent_style = space
indent_size = 2

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.toml]
indent_style = space
indent_size = 2

[*.sh]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
max_line_length = off
10 changes: 10 additions & 0 deletions .editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Exclude": [
"^bazel-",
"^\\.bazel-",
"^\\.mise/",
"^\\.vale/(Google|write-good|proselint|ai-tells.*)/",
"^\\.venv/",
"^tmp/"
]
}
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* text=auto eol=lf
# cmd.exe can misread labels in a batch file with LF line endings, so
# batch files check out with CRLF everywhere.
*.bat text eol=crlf
*.cmd text eol=crlf
go.sum -diff
MODULE.bazel.lock -diff linguist-generated
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
56 changes: 56 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!--
Fill in each section in plain prose and delete the guidance comments. Leave out
any section marked optional when there is nothing to say; don't write "None"
or "Low risk". Write each paragraph and list item on one line: GitHub
renders a newline as a line break, so a hard-wrapped paragraph shows ragged
short lines. The merge commit's title is the PR title. Word limits count
prose only: code blocks and links are free.

Agents don't use this form. They draft .github/PULL_REQUEST_DRAFT.md, which is
gitignored. Its frontmatter carries the metadata and its H1 is the title, and
the PR script lints the draft and opens the PR from it. The script also
appends the Generated-by and Assisted-by trailers as the body's last paragraph,
from the branch's commits and the posting agent's identity. Never write them.
-->

## Why

<!-- Required, at most 60 words. The problem in terms of behavior a user or
the system can see, in one to three sentences. Link the issue. -->

## Behavior change

<!-- Required, at most 120 words. What the system does differently now. Name a
file only when the file is itself the interface. -->

## Decisions

<!-- Optional, at most 120 words. Only choices worth recording, each as "chose
X over Y because Z". Leave the section out when nothing was decided beyond the
obvious. -->

## Deviations from the task

<!-- Optional, at most 80 words. Where the scope or approach changed from what
was asked, and why. -->

## Needs human judgment

<!-- Optional, at most 100 words. Open questions, guesses, and anything you
weren't confident about. -->

## Risk

<!-- Optional, at most 80 words. Specific failure modes and who they affect,
flags, rollback, and anything irreversible. -->

## Verification

<!-- Required, at most 150 words of prose plus any commands. Literal commands
with their results, or output from the command log. Leave out what CI already
reports. -->

## Human steering

<!-- Optional, at most 40 words. Who steered the work and how, when a person
did. Leave the section out for an autonomous run. -->
11 changes: 11 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Tony Burns

---
# actionlint 1.7.12 predates GitHub's ubuntu-26.04 images and reports their
# labels as unknown. This list only adds labels actionlint accepts; remove
# an entry once the pinned actionlint knows it.
self-hosted-runner:
labels:
- ubuntu-26.04
- ubuntu-26.04-arm
49 changes: 49 additions & 0 deletions .github/gitleaks-hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
# Copyright Tony Burns

shim=$1
config=$2
shift 2
base=
if [[ $1 == --base ]]; then
base=$2
shift 2
fi

if [[ -f $shim && -x $shim ]]; then
exec "$shim" "$@" --config "$config"
fi

expected_version=8.30.1
found='gitleaks absent from PATH'
if binary=$(type -P gitleaks); then
found='version command failed'
# Keep trailing newlines so extra output cannot match the pin.
if version=$("$binary" version 2>/dev/null && printf '.'); then
version=${version%.}
if [[ $version == "$expected_version" || $version == "$expected_version"$'\n' ]]; then
if [[ -z $base ]]; then
exec "$binary" "$@" --config "$config"
fi

# The root shim supplies this extension before it calls gitleaks.
# Add it to a temporary copy when calling the PATH binary directly.
effective=$(mktemp "${TMPDIR:-/tmp}/gitleaks-hook.XXXXXX") || exit 1
trap 'rm -f -- "$effective"' EXIT
{ cat -- "$config" && printf '\n[extend]\npath = "%s"\n' "$base"; } >"$effective" || exit 1
"$binary" "$@" --config "$effective"
exit $?
fi
found='no version output'
if [[ -n $version ]]; then
printf -v found 'found version %q' "${version%$'\n'}"
fi
elif [[ -n $version ]]; then
printf -v found 'version command failed with output %q' "$version"
fi
fi

printf 'gitleaks: need executable %s or gitleaks %s on PATH (%s).\n' \
"$shim" "$expected_version" "$found" >&2
exit 1
49 changes: 49 additions & 0 deletions .github/pull-request-sections.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Tony Burns

# The section scheme of a pull request description: the one source of truth
# for which H2 sections exist, their order, which are required, and their
# word limits. `tbhbdev alpha pr` reads it, and a test checks that
# the guidance comments in PULL_REQUEST_TEMPLATE.md state the same numbers.
# A limit counts prose words only: fenced code, inline code, link URLs, and
# HTML comments are free.

[[section]]
heading = "Why"
required = true
max_words = 60

[[section]]
heading = "Behavior change"
required = true
max_words = 120

[[section]]
heading = "Decisions"
required = false
max_words = 120

[[section]]
heading = "Deviations from the task"
required = false
max_words = 80

[[section]]
heading = "Needs human judgment"
required = false
max_words = 100

[[section]]
heading = "Risk"
required = false
max_words = 80

[[section]]
heading = "Verification"
required = true
max_words = 150

[[section]]
heading = "Human steering"
required = false
max_words = 40
14 changes: 14 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",

// The presets track tbhb-dev/renovate-config's main branch, pinned by
// commit; Renovate bumps the pins (the "renovate-config" group).
extends: [
"github>tbhb-dev/renovate-config//default.json5#ad8b77a732a0855deb411341b56296e58c1cc537", // main
"github>tbhb-dev/renovate-config//bazel.json5#ad8b77a732a0855deb411341b56296e58c1cc537", // main
"github>tbhb-dev/renovate-config//python.json5#ad8b77a732a0855deb411341b56296e58c1cc537", // main
],

// graph: one Bazel module and one uv project, no Go, so no go.json5.
// Nothing local is needed beyond the presets.
}
Loading
Loading