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
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug report
description: Report incorrect, unsafe, or confusing operation behavior.
title: "fix: "
labels:
- bug
body:
- type: markdown
attributes:
value: |
Do not disclose a security-sensitive history-loss, injection, credential, or unintended-publication issue here. Follow SECURITY.md instead.
- type: input
id: operation
attributes:
label: Operation and version
placeholder: git-fix-author at commit ...
validations:
required: true
- type: textarea
id: intent
attributes:
label: Intended outcome
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Minimal reproduction
description: Use a disposable repository and remove sensitive data.
validations:
required: true
- type: textarea
id: observed
attributes:
label: Observed behavior
validations:
required: true
- type: textarea
id: safety
attributes:
label: Repository and recovery state
description: Was anything mutated, and was a recovery ref created?
validations:
required: true
- type: input
id: git-version
attributes:
label: Git version
placeholder: git version 2.x.y
validations:
required: true
- type: input
id: platform
attributes:
label: Operating system and shell
validations:
required: true
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/new-operation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Propose an operation
description: Propose a reusable Git intent with explicit safety and recovery semantics.
title: "feat(operation): "
labels:
- enhancement
body:
- type: markdown
attributes:
value: |
An operation belongs in Git Intent when its intent is common, its raw Git procedure is non-trivial or risky, and its behavior can have a clear safety and recovery contract.
- type: textarea
id: intent
attributes:
label: What is the Git intent?
description: Describe the desired outcome without specifying commands.
validations:
required: true
- type: textarea
id: risk
attributes:
label: Why is native execution error-prone?
description: Explain what makes humans or agents likely to get this wrong.
validations:
required: true
- type: textarea
id: existing
attributes:
label: Existing solutions
description: Which Git commands, projects, or libraries already solve some or all of it?
validations:
required: true
- type: textarea
id: safety
attributes:
label: Proposed safety contract
description: What must never change, and what preconditions should be enforced?
validations:
required: true
- type: textarea
id: recovery
attributes:
label: Recovery model
description: How can the operation be inspected, reversed, or recovered?
validations:
required: true
- type: textarea
id: verification
attributes:
label: Verification invariants
description: How can the operation prove that only the requested change occurred?
validations:
required: true
- type: textarea
id: fit
attributes:
label: Why Git Intent?
description: Why should this be an executable operation rather than documentation or an ordinary Git command?
validations:
required: true
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:
test:
name: Integration tests (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- run: scripts/validate-skills
- run: scripts/test

lint:
name: Shell lint and format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: stable
cache: false
- name: Install linters
run: |
sudo apt-get update
sudo apt-get install --yes shellcheck
go install mvdan.cc/sh/v3/cmd/shfmt@v3.14.0
- name: ShellCheck
run: |
shellcheck \
scripts/test \
scripts/validate-skills \
skills/git-fix-author/scripts/git-fix-author \
tests/git-fix-author/test.sh
- name: shfmt
run: |
"$(go env GOPATH)/bin/shfmt" -d -i 2 -ci \
scripts/test \
scripts/validate-skills \
skills/git-fix-author/scripts/git-fix-author \
tests/git-fix-author/test.sh
23 changes: 23 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Code of Conduct

Git Intent is built through careful technical disagreement and shared respect.

Participants are expected to:

- be considerate, precise, and constructive;
- critique ideas and evidence rather than people;
- respect different experience levels and communication styles;
- disclose relevant constraints and conflicts of interest; and
- protect private, security-sensitive, and personally identifying information.

Harassment, threats, discriminatory conduct, deliberate intimidation, and
publication of another person's private information are not acceptable.

Project maintainers may clarify, edit, or remove contributions and restrict
participation when needed to protect the community. Report conduct concerns
privately through a maintainer contact listed on the repository profile. Reports
will be reviewed with discretion, fairness, and attention to the safety of the
people involved.

This code applies in project spaces and when someone is representing the
project in public.
54 changes: 54 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Contributing to Git Intent

Thank you for helping make risky Git work more predictable.

## Begin with the intent

Before proposing code, describe the outcome without prescribing commands. An
operation belongs in Git Intent when its intent is common, its raw Git procedure
is non-trivial or risky, and it can have explicit safety and recovery semantics.

Use the **Propose an operation** issue form. Identify existing tools before
designing a new engine. Building on maintained software is encouraged when it
improves correctness or safety.

## Operation requirements

New mutating operations must follow the
[operation contract](docs/operation-contract.md). A proposal should define:

- its exact mutation boundary;
- preconditions and unsupported cases;
- a read-only preview when technically possible;
- a recovery model;
- verification invariants;
- behavior in non-interactive environments; and
- how local mutation remains separate from remote publication.

Each operation should remain independently useful and have precise Agent Skill
discovery metadata. Avoid broad Git tutorials or catch-all skills.

## Development

Run the repository checks before opening a pull request:

```console
scripts/test
scripts/validate-skills
```

If ShellCheck and shfmt are installed, also run the lint commands documented in
the [README](README.md#develop-and-verify).

Tests for a mutating operation should create isolated disposable repositories
and verify behavior, not implementation wording. At minimum, cover dry-run
purity, rejection paths, promised history invariants, checkpoint reachability,
identity configuration isolation, and non-interactive behavior.

## Pull requests

Keep changes bounded to one intent. Explain the safety contract and evidence
from tests. Call out any engine-dependent limitation or changed recovery
behavior explicitly.

By participating, you agree to follow the [Code of Conduct](CODE_OF_CONDUCT.md).
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Git Intent contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,69 @@ use them.
> **The agent chooses the operation. The operation owns the surgery.**

This reduces improvisation without creating an agent-only Git abstraction.

## Install `git fix-author`

Install the reference operation somewhere on `PATH`:

```console
install -m 0755 \
skills/git-fix-author/scripts/git-fix-author \
"$HOME/.local/bin/git-fix-author"
```

Git discovers executables named `git-<command>`, so the installed program is
available as either `git-fix-author` or `git fix-author`.

Preview an inclusive rewrite range:

```console
git fix-author \
--start fix/author \
--finish feature/foo \
--name "AIPAL" \
--email "aipal@uklok.ai" \
--dry-run
```

Read [the operation guide](skills/git-fix-author/README.md) for behavior,
limitations, recovery, and automation examples.

## Project documents

- [Philosophy](docs/philosophy.md)
- [Architecture](docs/architecture.md)
- [Operation contract](docs/operation-contract.md)
- [Contributing](CONTRIBUTING.md)
- [Security policy](SECURITY.md)

## Develop and verify

The test suite creates disposable repositories and proves the promised history
invariants:

```console
scripts/test
scripts/validate-skills
```

ShellCheck and shfmt are used in CI when available locally:

```console
shellcheck scripts/test scripts/validate-skills \
skills/git-fix-author/scripts/git-fix-author \
tests/git-fix-author/test.sh

shfmt -d -i 2 -ci \
scripts/test scripts/validate-skills \
skills/git-fix-author/scripts/git-fix-author \
tests/git-fix-author/test.sh
```

## Status

`git-fix-author` is the first reference implementation of the Git Intent
operation contract. New operations should start from a real, repeatable Git
problem whose intent is simple but whose safe execution requires careful work.

Git Intent is licensed under the [MIT License](LICENSE).
33 changes: 33 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Security Policy

Git Intent performs repository mutations, so safety defects can have an impact
beyond ordinary command-line failures.

## Report a vulnerability

Do not open a public issue for a vulnerability that could cause silent history
loss, unintended ref mutation, command injection, credential disclosure, or an
unsafe remote update.

Use the repository host's private vulnerability-reporting feature. If that is
not enabled, contact the maintainers privately through an address listed on the
repository profile. Include:

- the affected operation and version or commit;
- the smallest safe reproduction;
- the expected and observed mutation boundary;
- whether a recovery ref was created; and
- any known workaround.

Do not include real credentials or sensitive repository contents.

## Supported versions

Until the first tagged release, only the current default branch receives
security fixes. This policy will be updated when versioned releases begin.

## Safety is not recovery

Keep independent backups of valuable repositories. Recovery refs reduce risk,
but they are stored inside the same object database and are not a substitute
for an external backup or remote copy.
Loading
Loading