Skip to content
Open
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
35 changes: 35 additions & 0 deletions .github/workflows/branch-naming.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Branch Naming Police'

on:
pull_request:
# Run this check when a PR is opened or when new commits are pushed to it
types: [opened, synchronize]

jobs:
branch-naming-rules:
name: Check Branch Name
runs-on: ubuntu-latest
steps:
- name: Get branch name
# This step extracts the branch name from the PR event data
id: get_branch_name
run: echo "branch_name=${{ github.head_ref }}" >> $GITHUB_OUTPUT

- name: Validate branch name
# This step uses the extracted branch name and tests it against the regex
run: |
BRANCH_NAME="${{ steps.get_branch_name.outputs.branch_name }}"
# This is the regex for your naming convention.
# It allows branches like:
# - issue/123-some-feature
# - issue/nt-another-feature
# It also allows 'main' and 'develop' to be valid source branches.
REGEX="^((issue\/(nt|\d+)-.+)|main|develop)$"

if [[ $BRANCH_NAME =~ $REGEX ]]; then
echo "Branch name '$BRANCH_NAME' is valid."
else
echo "Branch name '$BRANCH_NAME' is not valid."
echo "Please name your branch according to the pattern: issue/nt-description or issue/123-description"
exit 1
fi
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Shell Script Linter

on:
# Run on all pull requests and direct pushes to the main branch
pull_request:
push:
branches:
- main

jobs:
# This is the job name that will appear in GitHub's status checks
shellcheck:
name: Run Shellcheck Linter
# Use the latest version of Ubuntu to run the job
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository's code so the workflow can access it
- uses: actions/checkout@v4

# Step 2: Run the shellcheck linter on the 'position' script
# If shellcheck finds any issues, it will exit with a non-zero code,
# which will cause this job to fail, blocking the PR merge.
- name: Run shellcheck
run: shellcheck ./position
38 changes: 38 additions & 0 deletions GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Project Directives

This document contains the primary operating directives for the Gemini AI
assistant on this project. It also serves as a high-level guide for human
contributors.

## Key Project Files

This section acts as a map for the AI assistant.

- **`GEMINI.md` (This file):** My core principles and directives. Contains the
"why" behind our workflow and specific instructions for my behavior.
- **`CONTRIBUTING.md`:** The detailed, step-by-step "how-to" guide for human
developers. It contains the specifics of branch naming, local commits, and
PR titles. I will refer to this when I need to remind humans of the
process.
- **`README.md`:** The public-facing project overview. It explains what the
project is and how to install and use it.
- **`DESIGN_RATIONALE.md`:** The meta-document explaining the "why" behind the
project's structure and conventions.

## Development Philosophy

Our central philosophy is **Trunk-Based Development (TBD)**. The `main` branch
must always be stable and releasable. My primary goal is to help enforce the
conventions that support this philosophy.

## AI-Assisted Generation

When asked to generate a squash commit message, I will provide a complete,
formatted message including a descriptive subject and a detailed body.
- **Prompt:** `Generate the squash commit message for PR #<number>.`

## Formatting and Style

All Markdown files (`.md`) should be formatted to have a line length of 80
characters. This is a strong guideline that can be broken for content like
tables or long URLs.
Loading
Loading