Skip to content
Merged
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
20 changes: 20 additions & 0 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "lvbt",
"interface": {
"displayName": "Las Vegans for Better Transit"
},
"plugins": [
{
"name": "lvbt-contributions",
"source": {
"source": "local",
"path": "../../node_modules/@lvbt/cli/plugins/lvbt-contributions"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Developer Tools"
}
]
}
38 changes: 38 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"extraKnownMarketplaces": {
"lvbt": {
"source": {
"source": "github",
"repo": "LasVegasForTransit/repository-tooling",
"ref": "v0.2.7"
}
}
},
"enabledPlugins": {
"lvbt-contributions@lvbt": true
},
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "pnpm exec prettier --write --ignore-unknown \"$CLAUDE_FILE_PATHS\" 2>/dev/null || true"
}
]
}
]
},
"permissions": {
"deny": [
"Read(**/.dev.vars)",
"Read(**/.dev.vars.*)",
"Read(**/.env)",
"Read(**/.env.*)",
"Read(**/*.pem)",
"Read(**/*.key)",
"Read(**/id_rsa*)"
]
}
}
16 changes: 16 additions & 0 deletions .codex/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|mcp__github__create_issue|mcp__github__create_pull_request",
"hooks": [
{
"type": "command",
"command": "node \"$(git rev-parse --show-toplevel)/node_modules/@lvbt/cli/plugins/lvbt-contributions/hooks/codex-pre-tool-use.mjs\"",
"timeout": 10
}
]
}
]
}
}
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
5 changes: 5 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
# The shared hook lives in @lvbt/cli; repository-specific steps go below it.
set -eu
ROOT=$(git rev-parse --show-toplevel)
sh "$ROOT/node_modules/@lvbt/cli/hooks/commit-msg.sh" "$@"
5 changes: 5 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
# The shared hook lives in @lvbt/cli; repository-specific steps go below it.
set -eu
ROOT=$(git rev-parse --show-toplevel)
sh "$ROOT/node_modules/@lvbt/cli/hooks/pre-commit.sh" "$@"
5 changes: 5 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
# The shared hook lives in @lvbt/cli; repository-specific steps go below it.
set -eu
ROOT=$(git rev-parse --show-toplevel)
sh "$ROOT/node_modules/@lvbt/cli/hooks/pre-push.sh" "$@"
5 changes: 5 additions & 0 deletions .githooks/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
# The shared hook lives in @lvbt/cli; repository-specific steps go below it.
set -eu
ROOT=$(git rev-parse --show-toplevel)
sh "$ROOT/node_modules/@lvbt/cli/hooks/prepare-commit-msg.sh" "$@"
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Every change is reviewed by the maintainers team. Add narrower entries below
# for paths that need a specific reviewer, for example database migrations.
* @LasVegasForTransit/maintainers
20 changes: 20 additions & 0 deletions .github/actions/setup-node-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Setup Node + pnpm
description: Install the repository's pinned pnpm, cache its store, and install from the lockfile.

runs:
using: composite
steps:
# packageManager in package.json is the one version source; pnpm/action-setup
# reads it when no version input is supplied.
- name: Setup pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10

- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: package.json
cache: pnpm

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
44 changes: 44 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", ":semanticCommits"],
"schedule": ["before 6am on monday"],
"timezone": "America/Los_Angeles",
"labels": ["dependencies"],
"prHourlyLimit": 4,
"prConcurrentLimit": 8,
"rangeStrategy": "pin",
"lockFileMaintenance": {
"enabled": true,
"schedule": ["before 6am on monday"]
},
"customManagers": [
{
"description": "The @lvbt/* packages install from git tags of repository-tooling with a path: suffix that the npm manager does not parse, and the Claude Code marketplace pins the same tag. Track both as one dependency on the repository's tags.",
"customType": "regex",
"managerFilePatterns": ["/(^|/)package\\.json$/", "/(^|/)\\.claude/settings\\.json$/"],
"matchStrings": [
"github:LasVegasForTransit/repository-tooling#(?<currentValue>v\\d+\\.\\d+\\.\\d+)&path:/packages/[a-z-]+",
"\"repo\": \"LasVegasForTransit/repository-tooling\",\\s*\"ref\": \"(?<currentValue>v\\d+\\.\\d+\\.\\d+)\""
],
"depNameTemplate": "LasVegasForTransit/repository-tooling",
"datasourceTemplate": "github-tags",
"versioningTemplate": "semver"
}
],
"packageRules": [
{
"groupName": "LVBT repository standard",
"matchDepNames": ["LasVegasForTransit/repository-tooling"]
},
{
"groupName": "dev dependencies (non-major)",
"matchDepTypes": ["devDependencies"],
"matchUpdateTypes": ["minor", "patch"]
},
{
"matchUpdateTypes": ["patch"],
"automerge": true,
"automergeType": "branch"
}
]
}
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# The organization ruleset requires one status check named "Validate" on every
# pull request. Add steps to this job rather than renaming it.
name: CI

on:
pull_request:
branches: [main]
workflow_call:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
validate:
name: Validate
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# The secret scan reads history, not only the proposed tree.
fetch-depth: 0

- name: Setup Node + pnpm
uses: ./.github/actions/setup-node-pnpm

- name: Check
run: pnpm check

- name: Dependency audit
run: pnpm audit --audit-level=high

- name: Secret scan
run: |
set -euo pipefail
docker run --rm -v "$PWD:/repo" -w /repo \
ghcr.io/gitleaks/gitleaks@sha256:c00b6bd0aeb3071cbcb79009cb16a60dd9e0a7c60e2be9ab65d25e6bc8abbb7f \
git --redact --no-banner --config /repo/.gitleaks.toml
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules/
dist/
coverage/
.turbo/
.wrangler/
.env
.env.*
!.env.example
.dev.vars
.dev.vars.*
.DS_Store
11 changes: 11 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Secret scanning. Extends gitleaks' upstream ruleset; everything below is an
# exemption for paths that carry no secrets but trip generic entropy rules.
[extend]
useDefault = true

[allowlist]
description = "Paths that carry no secrets but trip generic entropy rules."
paths = [
'''pnpm-lock\.yaml''',
'''docs/superpowers/.*\.md''',
]
6 changes: 6 additions & 0 deletions .lvbt/commit-scopes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# One scope per durable boundary in this repository. Replace these with the
# boundaries of your repository; omit a scope when a change crosses them.
example
docs
ci
dx
25 changes: 25 additions & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// Documentation is checked like code: every relative link and anchor must
// resolve, and prose wraps at the same 100 columns Prettier uses.
"customRules": ["markdownlint-rule-relative-links"],
"config": {
"default": true,
"MD013": { "line_length": 100, "code_blocks": false, "tables": false, "headings": false },
"MD033": false,
"relative-links": true,
},
"globs": ["**/*.md"],
"ignores": [
// Playwright output.
"**/test-results",
"**/playwright-report",
".claude/worktrees",
"node_modules",
"**/node_modules",
"dist",
"**/dist",
".turbo",
"docs/superpowers",
"CHANGELOG.md",
],
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pnpm-lock.yaml
.claude/worktrees/
# Generated by `wrangler types`; regenerate it, never hand-edit it.
**/worker-configuration.d.ts
47 changes: 47 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Working in this repository

Run `pnpm check` after every change. It is the same command CI runs, and a failing check names the
command that fixes it (`pnpm check:fix` repairs everything a machine can).

## Standard commands

Every LVBT repository answers to the same commands:

| Command | What it does |
| --------------------- | ---------------------------------------------------------- |
| `pnpm bootstrap` | Install dependencies, wire git hooks, and run preflight |
| `pnpm preflight` | Confirm the machine can build and deploy this repository |
| `pnpm check` | Format, docs, shape rules, lint, types, tests, repo checks |
| `pnpm check:fix` | Apply formatting and lint fixes |
| `pnpm build` | Build every package |
| `pnpm test` | Run every package's tests |
| `pnpm run deploy` | Build, then `wrangler deploy` every app (deployable repos) |
| `turbo gen workspace` | Scaffold a new package or app |

## Create GitHub issues and pull requests

Use the mandatory `github-contribution` skill from the `lvbt-contributions` plugin whenever a user
authorizes creating an issue or pull request. It carries the organization checklist, readable
templates, and the only approved creation helper:

```bash
node node_modules/@lvbt/cli/plugins/lvbt-contributions/scripts/github-create.mjs issue \
--type bug|feature --title <title> --body-file <file>
node node_modules/@lvbt/cli/plugins/lvbt-contributions/scripts/github-create.mjs pr \
--title <title> --body-file <file> --base main
```

Preview with `--dry-run --json` and inspect the complete Markdown before creating anything. Do not
call `gh issue create`, `gh pr create`, equivalent `gh api` routes, or connector creation tools
directly.

## Commit messages

Subjects are conventional: `type(scope): description`, at most 72 characters. Scopes are optional
and come only from [`.lvbt/commit-scopes.txt`](.lvbt/commit-scopes.txt). Omit the scope when a
change crosses boundaries; never invent one for a feature, file, task, or role.

## The repository standard

Lint, format, TypeScript, and test settings extend the `@lvbt/*` packages from
`LasVegasForTransit/repository-tooling`. Change a shared rule there, not here.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# template-basic
Template for a new LVBT repository (published from repository-tooling examples/basic on each release)
# LVBT package repository

A Turborepo workspace following the LVBT repository standard. It was created with:

```bash
npx create-turbo@latest --example https://github.com/LasVegasForTransit/repository-tooling/tree/main/examples/basic
```

## Getting started

```bash
pnpm bootstrap # install, wire git hooks, run preflight
pnpm check # the same check CI runs
```

Then rename the root package and `packages/example`, and replace the scopes in
`.lvbt/commit-scopes.txt` with this repository's boundaries.

## Layout

- `apps/` for deployable applications and services
- `packages/` for libraries and tools; `packages/example` shows the shape of one

Lint, format, TypeScript, and test settings extend the `@lvbt/*` packages from
[`LasVegasForTransit/repository-tooling`](https://github.com/LasVegasForTransit/repository-tooling).
Empty file added apps/.gitkeep
Empty file.
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Documentation

This documentation follows [Diátaxis](https://diataxis.fr) under domain directories: tutorials
teach, how-to guides complete one task, reference records facts, and explanation gives the why.
Domains are `development` (working on the code), `operations` (running it), `product` (what it is
for), and `security`. Every document is listed here so it can be found.

## Tutorials

- [Start here](development/tutorials/start-here.md)

## Reference

- [Glossary](development/reference/glossary.md)
Loading