> ## Documentation Index
> Fetch the complete documentation index at: https://gump.top/sdlc-harness-docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CI and GitHub

> Apply the same gates in Git hooks, GitHub Actions, and cross-machine collaboration.

## Local commit gate

```bash theme={null}
git config core.hooksPath .githooks
```

The generated pre-commit hook runs `validate`. Configure it once in each clone.

## GitHub Actions

`init` and `adopt` generate CI and deployment workflows. They pin third-party Actions to full commit SHAs and fail closed when real project checks or deployment steps have not been configured. After integration, connect the project's own install, build, test, and deployment commands.

For `passing_is_monotonic` to detect a state regression in a fresh checkout, CI must fetch enough Git history and provide a resolvable Git baseline:

```yaml theme={null}
- uses: actions/checkout@<full-commit-sha>
  with:
    fetch-depth: 0
```

```bash theme={null}
HARNESS_BASE_REF=origin/main npx @caesarlo/sdlc-harness validate
```

[See the `validate` command →](/sdlc-harness-docs/reference/command-repository#validate)

GitHub Actions also recognizes `GITHUB_BASE_REF`. Without a Git baseline, the tool falls back to the local successful validation snapshot. If neither exists, it does not report a false regression.

## Repository governance check

```bash theme={null}
npx @caesarlo/sdlc-harness provider github check
```

[See the `provider github check` options →](/sdlc-harness-docs/reference/command-github#check)

This command checks the GitHub configuration for the target branch. It infers `owner` and `repo` from `origin` by default, or you can provide them explicitly:

```bash theme={null}
npx @caesarlo/sdlc-harness provider github check \
  --owner acme --repo checkout --branch main
```

[See the `owner`, `repo`, and `branch` options →](/sdlc-harness-docs/reference/command-github#check)

`PASS` means the configuration was confirmed to meet the requirements, `FAIL` means it was confirmed not to meet them, and `UNKNOWN` means the current token lacks administrator permissions, so the result cannot be determined. This command does not run feature tests and does not replace `validate`.

## Import CI evidence

```bash theme={null}
npx @caesarlo/sdlc-harness evidence import M1-AUTH-001 --ci-run 123456
```

[See the `evidence import` options →](/sdlc-harness-docs/reference/command-evidence#import)

Before importing, the tool uses `gh api` to confirm that the run completed successfully. Add `--owner` and `--repo` when you need to specify the repository explicitly.

## Cross-machine claims

```bash theme={null}
npx @caesarlo/sdlc-harness claim M1-AUTH-001 --owner alice --push
```

[See the `claim --push` options →](/sdlc-harness-docs/reference/command-claim#push)

Git is not a real-time lock: two machines can claim the same feature locally at the same time. `--push` commits and pushes the claim. If the remote has already confirmed a claim for the same feature, the tool synchronizes and then attempts to claim the next ready feature. Use `--remote` and `--branch` to change the target.

<Warning>
  Do not treat a regular local claim as a cross-machine lock. For cross-device collaboration, use `--push` and synchronize remote state before starting work.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.